I have made a custom listView which which extends ListActivity and each row contains 2 textview and a button.
adapter = new SimpleAdapter(this, arraylist, R.layout.simplelistcustom, new String[] { "count","title"},
new int[] {R.id.invisible, R.id.textView11 });
setListAdapter(adapter);
When clicking on the List View row ,i get the selected row index and by using the index
i get the row child
protected void onListItemClick(ListView listView, View view, int position, long id)
{
super.onListItemClick(listView, view, position, id);
String selection = listView.getItemAtPosition(position).toString();
}
The output when i displayed in the “selection” in Logcat is
{count=6, title=etywewetr}
Problem is i want to seperate the content….How can this possible….plz help
thanx in advance
The getItemAtPosition method is returning you an element from your arraylist parameter; you just need to cast it to the correct type. Assuming your arraylist is a List<Map<String, String>> (which I suspect it is):