Android: Listview's Onitemclick() Event Not Getting Called
Following is my code : public class TestActivity extends ListActivity { private Cursor cursor; /** Called when the activity is first created. */ @Override public
Solution 1:
I was having a similar problem and found that after removing android:clickable="true"
from my list items, the onListItemClick() was being triggered just fine. I hope this helps.
Solution 2:
protectedvoidonListItemClick(ListView l, View v, int position, long id) {
super.onListItemClick(l, v, position, id);
StringmString= parent.getItemAtPosition(position).toString();
//will give you the text of current line orinti= parent.getItemAtPosition(position);
//if you want just position number
}
Solution 3:
The solution is to override protected void onListItemClick (ListView l, View v, int position, long id) method.
Post a Comment for "Android: Listview's Onitemclick() Event Not Getting Called"