Skip to content Skip to sidebar Skip to footer

Listview Onclicklistener() Does Not Work After Adding Radiobutton

I have a ListView (my_list.xml):

Solution 1:

Set the following properties to your RadioButton:

android:focusable="false"android:focusableInTouchMode="false"

and in your OnItemClickListener, you need to set the radio button's checked flag by code.


Set you ListView as below:

<ListView
  android:id="@+id/my_list"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent" />

Solution 2:

add this code to your RadioButton XML code:

android:focusable="false"android:focusableInTouchMode="false"

Another keyword to solve this problem is TouchDelegate.

Edit:

https://stackoverflow.com/a/5528945/1285331

Post a Comment for "Listview Onclicklistener() Does Not Work After Adding Radiobutton"