I am having trouble removing the focus from checkboxes in list view items. Whenever i click the list item, the checkbox receives focus.
I am experiencing this problem on Android 4.0.4 Samsung GT-P7500. Newer versions dont have this issue.
<RelativeLayout xmlns:android="http://ift.tt/nIICcg"
android:orientation="vertical"
android:id="@+id/list_item_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/medium_padding"
android:descendantFocusability="blocksDescendants">
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/category_checkbox"
android:focusable="false"
android:duplicateParentState="false"
android:focusableInTouchMode="false" />
As you can see i tried with all available parameters that were recommended by stack answers:
For parent:
android:descendantFocusability="blocksDescendants"
For checkbox:
android:focusable="false"
android:duplicateParentState="false"
android:focusableInTouchMode="false"
Aucun commentaire:
Enregistrer un commentaire