Today, when setting up a ListView custom adapter, clicking on item has a click Effect and then clicking on a button in the item layout file also triggers the Click Effect of the ListView.
Solutions are:
1. Add in the adapter layout file
<?XML version= "1.0" encoding= "Utf-8"?><LinearLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Wrap_content"Android:background= "@drawable/common_strip_setting_middle"android:descendantfocusability= "Blocksdescendants"android:orientation= "Horizontal" ></LinearLayout>
2. Add in ImageButton
Android:focusable= "false"
< ImageButton Android:layout_width = "25DP" android:layout_height= "25DP" android:layout_marginleft= "10DP" android:background= "@drawable/calling_btn" android:contentdescription = "@string/empty" android:focusable= "false"/>
Solution for button Event Click Conflict Problem in Android ListView