Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7819805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:04:49+00:00 2026-06-02T07:04:49+00:00

I have got the response from server which I have stored in the list.I

  • 0

I have got the response from server which I have stored in the list.I am getting the whole datain list.But I want it to set to set the data from list to two different textViews.How can I do this.I have already parse the data and got the proper response but just want to split data into two textViews

My Code is

myList = new ArrayList<HashMap<String, Object>>();

             mainListView = (ListView) findViewById(R.id.main_listview);



                    /*tv = (TextView) findViewById(R.id.result);
            tv1 = (TextView) findViewById(R.id.result1);
            tv2 = (TextView) findViewById(R.id.result2);*/
            request = new SoapObject(NAMESPACE, METHOD_NAME);
            request.addProperty("FilterCondition", "");
            request.addProperty("UserID", -1);
            request.addProperty("Type", "ALL");
            request.addProperty("PageID", 1);
            request.addProperty("SiteURL", "http://www.xxx.mobi/");
            request.addProperty("SortCondition", "order by name");
            request.addProperty("FilterID", -1);
            request.addProperty("KeyValue", 1);
            request.addProperty("EventFilterType", "");
            SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(
                    SoapEnvelope.VER11);
            envelope.dotNet = true;
            SoapObject result = null;
            envelope.setOutputSoapObject(request);
            AndroidHttpTransport sab = new AndroidHttpTransport(URL);
            // Category C=new Category();
            sab.debug = true;
            try {
                sab.call(SOAP_ACTION, envelope);
                if (envelope.getResponse() != null) {
                    result = (SoapObject) envelope.bodyIn;
                    String[] values = new String[result.getPropertyCount()];
                    for (int i = 0; i < result.getPropertyCount(); i++) {
                        Log.d("Value", result.getProperty(i).toString());
                        int j = result.getPropertyCount();
                        Log.d("count is", Integer.toString(j));
                    //  tv.setText("ss:" + result);
                        Log.d("status", result.toString());
                    }
                    list = new ArrayList<String>(
                            result.getPropertyCount());
                    String lv_arr[] = new String[result.getPropertyCount()];
                    for (int i1 = 0; i1 < 1; i1++) {
                        Object property = result.getProperty(i1);
                        if (property instanceof SoapObject) 
                        {
                            SoapObject countryObj = (SoapObject) property;
                            SoapObject countryName = (SoapObject) countryObj
                                    .getProperty("diffgram");
                            SoapObject country = (SoapObject) countryName
                                    .getProperty("NewDataSet");
                            SoapObject ss = (SoapObject) country
                                    .getProperty("Table");
                            Log.d("message", ss.getProperty("Name").toString());
                            list.add(ss.getProperty("Name").toString());
                            list.add(ss.getProperty("ShortDescription").toString());
                            list.add(ss.getProperty("IconPath").toString());

                            Log.d("list values", list.toString());

                            /*
                             * JSONObject o = new JSONObject(sr); JSONArray
                             * js=o.getJSONArray("Table"); for(int i4 = 0; i4 <
                             * js.length(); i4++){
                             * 
                             * Log.d("log_tag","_id"+o.getInt("Name")+
                             * ", mall_name"+o.getString("ObjectID")+
                             * ", location"+o.getString("ComponentID"));
                             */
                            /*tv.setText(list.get(0).toString());
                            tv1.setText(list.get(1).toString());
                            tv2.setText(list.get(2).toString());*/

                        }

                        else 
                        {
                            Log.d("response", "null");
                        }
                    }


                //  addDataToList();
                    ArrayList fillMaps = new ArrayList();  
                            for(int i = 0; i < 10; i++){
                                 HashMap<String,Object > map1 = new HashMap<String,Object>();
                            map1.put("icon", R.drawable.ic_launcher);
                            map1.put("Course", list);
                            map1.put("Description", "");
                              fillMaps.add(map1);
                            }

                    SimpleAdapter aa = new SimpleAdapter(this, fillMaps, R.layout.row,
                            new String[] {"Course", "Description", "icon"}, 
                            new int[] {R.id.txt1, R.id.txt2, R.id.img1});
                            mainListView.setAdapter(aa);
                }
            }
            catch (Exception e) {
                e.printStackTrace();
            }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T07:04:51+00:00Added an answer on June 2, 2026 at 7:04 am

    Do you need customized listView ? (mean you want to display 2 text boxes per row ?)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have generic async task class which fetches response from server . And i
I am getting a response from server which I need to deserialize using protobuf.
Have got an NSString *str = @12345.6789 and want to find out if there
I have got a form into which information is entered, and a drop down
i have got <div><a class='link' href='index.php' data-container='target'>Load</a></div> <div class='target'></div> i need to write jquery
I have got a table [newsletter] in the db, which saves the email address,
I have got two pages. example.com/php.com and example.com. I use this function to set
I have got a few tables which I am trying to join. I just
I have a shell script which I'd like to trigger from a J2EE web
I have the following code (I'm working from code at http://www.linuxhowtos.org/C_C++/socket.htm ) which I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.