How to get value from adapter position, i have code in below:
CategoriesXmlParser categoryXmlParser = new CategoriesXmlParser();
List
Looks like you made the object with hashmap, such blablabla.put("name", "value")?? If yes. Try this:
mListView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView> parent, View view,
int position, long id) {
Object obj = mListView.getAdapter().getItem(position);
String value = obj.toString();
Log.d("MyLog", "Value is: "+value);
String name = // how code to get name value.
}
});
Change to:
mListView.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView> parent, View view, int position, long id) {
HashMap obj = (HashMap) adapter.getItem(position);
String name = (String) obj.get("name");
Log.d("Yourtag", name);
}
});