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 8717097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:14:00+00:00 2026-06-13T06:14:00+00:00

I getting full information like Country ID,Country Name & Description from WCF Webservice &

  • 0

I getting full information like Country ID,Country Name & Description from WCF Webservice & i have successfully populate in listview which display Country Name only.Now when i select one of the country name in listview for editing,I must get all of the details like country ID & description but i manage to get country name only.Can anyone please guide me.thanks in advance.

        //Populate Country Name in Listview 

        String jsonInput=wcfItems;
    ArrayList<String> listItems = new ArrayList<String>();
    try{ 

    JSONArray jsonArray = new JSONArray(jsonInput);
      int length = jsonArray.length();
      List<String> listContents = new ArrayList<String>(length);
      for (int i = 0; i < length; i++)
      {
          splitItem=jsonArray.getString(i).split(",");
              //splitItem[0].toString().trim() -->is ID
              //splitItem[2].toString().trim() -->is Description
          listContents.add(splitItem[1].toString().trim() ); //Country Name
      }

      ListView myListView = (ListView) findViewById(R.id.listView1);
      myListView.setAdapter(new ArrayAdapter<String>(this,       android.R.layout.simple_list_item_1, listContents));

            public void onItemSelected(AdapterView<?> parent, View v, int position,
        long id) {
            //Didn't get country_ID
    String country_ID=parent.getItemAtPosition(position).toString();
            //Manage to get country_name only
            String country_Name=parent.getItemAtPosition(position).toString();
            //Didn't get Description
    String country_Description=parent.getItemAtPosition(position).toString();
    getRateItems(country_ID,country_Name);
  • 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-13T06:14:02+00:00Added an answer on June 13, 2026 at 6:14 am

    You can track the jsonArray as the Activity member, so later in the onItemSelected() you can get the same splitItem via jsonArray.getString(position).

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

Sidebar

Related Questions

I am getting some API information from Weather Underground and was wondering if it
Arrrgh, I am not getting this. I have a table of accounts from Dynamics
The full error I'm getting is this: error: ambiguous overload for ‘operator[]’ in ‘a[boost::_bi::storage4<A1,
I am having problems getting my main content div to stretch to full height,
I gave a site full trust however I am still getting some security exceptions.
I am trying to create full text index but I am getting error which
I'm having problems with getting my KeyBoardFocusManger to work with my full screen Window
I'm getting started with Selenium IDE and trying to test a webapp that's full
I am getting the common ASP.NET YSOD error. Here is the full error page
Getting extremely confused with an adminhtml module i'm trying to write! Effectively I have

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.