原因:条目中含有CheckBox控制,将条目的焦点抢走了
解决: android:focusable=“false”
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:focusable="false"
android:buttonTint="@color/blue" />
button也需要设置成focusable=“false”
<Button
android:id="@+id/lift_state_bt"
android:text="梯困"
android:focusable="false"
android:layout_gravity="center"
android:textColor="@color/white"
android:drawablePadding="7dp"
android:background="@null"
android:drawableTop="@mipmap/tikun_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>