I have created custom list view which have one button, My problem is after adding button in list item onItemClick of list view has stop working. Is there any way to keep both listeners working?
Asked
Active
Viewed 226 times
-3
-
show me your ListItem layout – M D Jun 05 '14 at 09:51
-
Please read this before asking a question: http://stackoverflow.com/help/how-to-ask – UeliDeSchwert Jun 05 '14 at 09:51
-
Simple Plan my list item xml has so meny things so I cant put it into comment, but in short it contains images textviews and one button. before adding button onItamClick was working – DCoder Jun 05 '14 at 09:56
-
@VarunKarhadkar i faced the same issue in past and i solved it just by my asnwer given below. – M D Jun 05 '14 at 09:57
1 Answers
4
set this to your ListItem root Layout
android:descendantFocusability="blocksDescendants"
and set
android:focusable="true"
android:focusableInTouchMode="true"
to your Buttons
. It's seems working in my case.

M D
- 47,665
- 9
- 93
- 114