I have a ListView in my ListView show ImageButton.
I set focusalble "false" and focusableInTouchMode "false" to ImageButton.
I set ListView.OnItemClickListner. When I run my project It's show my ListView.
But When I click on Listview It's not working.
Then I remove ImageButton in layout and run my project again when i click ListView It' work
What wrong ?
android:focusable="false"
android:focusableInTouchMode="false"
doesn't work for ImageButton.
In your layout xml, add this property to root layout
android:descendantFocusability="blocksDescendants"
It works perfectly for a listview that has ImageButton.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With