Reputation: 13165
I am using a custom list view. I have tried to get the value of the row which the user clicked. Can anybody tell me how to get the value?
Thanks
Upvotes: 1
Views: 285
Reputation: 5438
You may want to implement a new method in your class, specifically onItemClick
:
[...]
private ListView lv;
[...]
public void onItemClick(AdapterView<?> a, View v, int position, long id) {
String itemValue = lv.getItemAtPosition(position);
[... do something ...]
}
Then you can do whatever you want with with itemValue
.
Hope this helps.
Upvotes: 2