I have used a button in all list items of a listview. I lost the list item click when i added a clickable componenet is list items of the list view. Now i need to add a button in listitems in of the listview and i added it. I need to have click event for both list items and also the buttons. How can i make is possible. Please share. Thanks in advance.
Asked
Active
Viewed 122 times
0
-
Have a look [here](http://stackoverflow.com/questions/1709166/android-listview-elements-with-multiple-clickable-buttons) – Adil Soomro Oct 31 '11 at 05:42
1 Answers
0
You'll have to attach click listeners to the internal views. Try to create a listener for each ViewHolder and recycle them just like you do for the views passed in to getView(). Note that you'll also have to attach a long click listener or explicitly disable long clicks on the new clickable subview or you will lose the context menu on the list item. Another thing to think about is how you intend to handle d-pad navigation with these sub-views.

Jess Anders
- 968
- 1
- 8
- 11