Reputation:
I have a ListView and a basic custom cursor adapter. When I add an imagebutton the List View Item does not respond to item click or long item click
how I am going to fix this? Do I need to set to clickable something?
Upvotes: 0
Views: 97
Reputation: 767
probably
android:focusable="false"
android:focusableInTouchMode="false"
not work . you have to add-
android:descendantFocusability="blocksDescendants"
in your layout. please see this link for details.
alternatively you can use Button or create own button using native layout.
Upvotes: 1
Reputation: 7533
Probably you need to set the following in your ImageButton -
android:focusable="false"
android:focusableInTouchMode="false"
Alternatively you can add android:descendantFocusability="blocksDescendants"
to the root item of your row layout XML.
Upvotes: 0
Reputation: 14
If it works with an ordinary Button
, maybe you can just set its background instead of using ImageButton
Upvotes: 0