Trying to catch a click on android ListView item: android:descendantFocusability=“blocksDescendants” not working

后端 未结 3 662
忘了有多久
忘了有多久 2020-12-05 15:34

This has been addressed in many posts on StackOverflow. The most recommended solution is to set:

android:descendantFocusability=\"blocksDescendants\"
         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-05 16:01

    Have you tried adding android:clickable="false" for the buttons? I just ran into a similar issue and that fixed it for me, whereas using android:focusable="false" did not.

    Good luck!

提交回复
热议问题