I have a ListView with item contains a checkbox and some other elements. The problem is when I click on the list item on Android 5+ device I have it looks like this:
I don't want to have ripple effect around the checkbox. How can I acheive that?
Item XML code:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="@dimen/list_item_height" android:gravity="center_vertical" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"> <CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/item_check" android:checked="false" android:focusable="false" android:layout_marginRight="32dp" android:clickable="false"/> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/item_title" android:textAppearance="@android:style/TextAppearance.Medium" android:maxLines="1" android:lines="1"/> </LinearLayout>
Try setting Background as Transparent to Checkbox
android:background="@android:color/transparent"
Hope it helps.Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With