Add selectable background to list items and cards.

This commit is contained in:
Peter Serwylo 2017-04-05 13:12:51 +10:00
parent 89e103fc23
commit 89625ac355
6 changed files with 17 additions and 5 deletions

View File

@ -35,6 +35,8 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/header_height"
android:foreground="?attr/selectableItemBackground"
android:clickable="true"
>
<android.support.constraint.ConstraintLayout

View File

@ -3,7 +3,9 @@
xmlns:app="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:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground"
android:clickable="true">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"

View File

@ -3,7 +3,9 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="220dp">
android:layout_height="220dp"
android:foreground="?attr/selectableItemBackground"
android:clickable="true">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"

View File

@ -3,7 +3,9 @@
xmlns:app="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:layout_height="wrap_content"
android:foreground="?attr/selectableItemBackground"
android:clickable="true">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"

View File

@ -4,7 +4,9 @@
xmlns:app="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:layout_height="wrap_content"
android:clickable="true"
android:background="?attr/selectableItemBackground">
<!-- Ignore ContentDescription because it is kind of meaningless to have TTS read out "App icon"
when it will inevitably read out the name of the app straight after. -->

View File

@ -7,7 +7,9 @@
android:layout_height="wrap_content"
android:padding="4dp"
android:paddingTop="8dp"
android:paddingBottom="8dp">
android:paddingBottom="8dp"
android:clickable="true"
android:background="?attr/selectableItemBackground">
<!-- Ignore ContentDescription because it is kind of meaningless to have TTS read out "App icon"
when it will inevitably read out the name of the app straight after. -->