I'm having a frustrating issue with a RecyclerView filled with CheckedTextViews when running on Android 5.0 Lollipop. All versions before Lollipop are fine and don't exhibit this issue. Check out the pictures below for a better understanding:
Pre-Lollipop
Lollipop
See how Lollipop only draws the selection highlight on top of just the checkbox part of the CheckedTextView? Pre-Lollipop doesn't have this issue / bug, and draws the selection highlight across the entire width of the view (which is the behavior that I want).
Here is the CheckedTextView that I'm drawing to the list:
<?xml version="1.0" encoding="utf-8"?>
<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?attr/selectableItemBackground"
android:checkMark="@drawable/checkbox"
android:id="@+id/model_checkable_name"
android:layout_height="48dp"
android:layout_width="match_parent" />
Any ideas? I've tried a handful of various different solutions, such as android:focusable="false"
, android:duplicateParentState="true"
, android:duplicateParentState="false"
...
Thanks guys!