my list items implements OnTouchListener and therefore the OnItemClicked() method of the ListView is not invoked. Can anyone help me to make it work?
Asked
Active
Viewed 1,009 times
1 Answers
1
Take a look here:
Clickable ListView
I had the same problem on the first time ;)
-
thanks! but my problem is something else. the UI structure is like this: ListView contains MyView(implements OnTouchListener) which contains CheckBox. before i implement OnTouchListener, i can get onItemclick() for the ListView and onclick() for the CheckBox both work. after implementing OnTouchListener for MyView, OnItemClick() is not invoked anymore. Seems that since MyView covers the whole space of a ListView item, it takes over all the touch events so the ListView is not getting any. how can i deal with it? – yimei Jan 23 '11 at 19:36
-
what for you need the onTouchListener? isn't it sufficient to use onClick and onLongClick? – Beasly Jan 23 '11 at 19:41