From 89625ac355cb5bad8853a47bdd4fb049288e6956 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Wed, 5 Apr 2017 13:12:51 +1000 Subject: [PATCH] Add selectable background to list items and cards. --- app/src/main/res/layout/app_card_featured.xml | 2 ++ app/src/main/res/layout/app_card_horizontal.xml | 4 +++- app/src/main/res/layout/app_card_large.xml | 4 +++- app/src/main/res/layout/app_card_list_item.xml | 4 +++- app/src/main/res/layout/app_list_item.xml | 4 +++- app/src/main/res/layout/installed_app_list_item.xml | 4 +++- 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/src/main/res/layout/app_card_featured.xml b/app/src/main/res/layout/app_card_featured.xml index a5d7b47e1..835b82f34 100644 --- a/app/src/main/res/layout/app_card_featured.xml +++ b/app/src/main/res/layout/app_card_featured.xml @@ -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:layout_height="wrap_content" + android:foreground="?attr/selectableItemBackground" + android:clickable="true"> + android:layout_height="220dp" + android:foreground="?attr/selectableItemBackground" + android:clickable="true"> + android:layout_height="wrap_content" + android:foreground="?attr/selectableItemBackground" + android:clickable="true"> + android:layout_height="wrap_content" + android:clickable="true" + android:background="?attr/selectableItemBackground"> diff --git a/app/src/main/res/layout/installed_app_list_item.xml b/app/src/main/res/layout/installed_app_list_item.xml index 764e202db..0ffc031ab 100644 --- a/app/src/main/res/layout/installed_app_list_item.xml +++ b/app/src/main/res/layout/installed_app_list_item.xml @@ -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">