Added very slight hint of the card being selectable

This commit is contained in:
Viktor De Pasquale 2020-02-06 15:18:35 +01:00 committed by John Wu
parent db4ef1443d
commit fdfa037dca
3 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_selected="true">
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="@dimen/r1" android:topRightRadius="@dimen/r1" />
<solid android:color="?colorSurfaceVariant" />
<stroke android:width="1.5dp" android:color="?colorSurfaceVariant" />
</shape>
</item>
<item>
<shape android:shape="rectangle">
<corners android:bottomLeftRadius="@dimen/r1" android:topRightRadius="@dimen/r1" />
<stroke android:width="1.5dp" android:color="?colorSurfaceVariant" />
</shape>
</item>
</selector>

View File

@ -130,6 +130,13 @@
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatImageView
isSelected="@{item.enabled}"
android:layout_width="@dimen/l1"
android:layout_height="@dimen/l1"
android:layout_gravity="right|top"
app:srcCompat="@drawable/ic_card_check" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>

View File

@ -178,6 +178,13 @@
</LinearLayout> </LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
isSelected="@{item.enabled}"
android:layout_width="@dimen/l1"
android:layout_height="@dimen/l1"
android:layout_gravity="right|top"
app:srcCompat="@drawable/ic_card_check" />
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</layout> </layout>