Hi everyone!
I'm new to android programming and I would like some help. I have the following code:
Object[] list_cities = parsedData.getCityname().toArray();
Object[] list_countries = parsedData.getCountryname().toArray();
// Display the available locations
list_search.setAdapter(new ArrayAdapter<Object>(this, android.R.layout.simple_list_item_2, android.R.id.text1, list_cities));
list_search.setAdapter(new ArrayAdapter<Object>(this, android.R.layout.simple_list_item_2, android.R.id.text2, list_countries));
I would like to display double rows for each entry in the list (city and country) but I have no luck. With the above code I only see the countries but not the cities. Is there any way to add both the adapters to the list_search so I can see all the data?
Thank you all for your answers!!