Делаю список через RecyclerView
и CardView
. Всё работает, кроме скругления углов, Вот их разметки:
UPDATE
Спустя некоторое время выяснил, что всё это из-за того, что в адапторе для ActionMode задаю цвет Background. Что также меняет и внешний вид CardView. Как правильно менять цвет, что бы он не изменять вид Cardview?
holder.itemView.setBackgroundColor(ContextCompat.getColor(context, R.color.recycleviewBackground));
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/cardView"
card_view:cardCornerRadius="20dp"
card_view:contentPadding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/itemTitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="5"
android:gravity="center_vertical|start"
android:text="Title"
android:textColor="@android:color/black"
android:textSize="14sp" />
<CheckBox
android:id="@+id/checkBox"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:clickable="false"
android:focusable="false"/>
</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<!-- Recycler View -->
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewItemList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"/>
</LinearLayout>