item点击无效大多数情况是因为item布局中含有ImageButton,Button,CheckBox等子控件。在点击item时,这些子控件会首先获取焦点,所以点击item时变化的是子控件,item本身的点击无效。
以前处理这类问题都是使用
android:focusable=""
android:focusableInTouchMode=""
来处理,最近新发现了一个新的属性可以更好的处理这类问题,就是
android:descendantFocusability
官方API时这么写的:
android:descendantFocusability
Defines the r