From 3d988caf675cc8360650c1dee20a0bd0b2dbcce2 Mon Sep 17 00:00:00 2001 From: Zemiao Zhu Date: Fri, 7 May 2021 13:25:18 -0700 Subject: More Material Next changes to RecyclerView items: - Add ripple animation on click. - Use dynamic color for tablet list item layout. Bug: 185831119, 185076062 Test: manual Change-Id: I888668112121cbaa083f04854246a73b0026251c --- res/layout/item_dir_grid.xml | 13 +++++++------ res/layout/item_doc_grid.xml | 13 +++++++------ res/layout/item_doc_list.xml | 2 ++ 3 files changed, 16 insertions(+), 12 deletions(-) (limited to 'res/layout') diff --git a/res/layout/item_dir_grid.xml b/res/layout/item_dir_grid.xml index 269dd0782..8720c37cf 100644 --- a/res/layout/item_dir_grid.xml +++ b/res/layout/item_dir_grid.xml @@ -21,19 +21,21 @@ to focus and selection states, some of which are specific to keyboard when touch mode is not enable. So, if you, heroic engineer of the future, decide to rip these out, please be sure to check out focus and keyboards. --> - + android:layout_margin="4dp" + android:foreground="?android:attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + app:cardElevation="0dp"> - \ No newline at end of file + \ No newline at end of file diff --git a/res/layout/item_doc_grid.xml b/res/layout/item_doc_grid.xml index 9159a20d3..7b025419f 100644 --- a/res/layout/item_doc_grid.xml +++ b/res/layout/item_doc_grid.xml @@ -20,19 +20,21 @@ to focus and selection states, some of which are specific to keyboard when touch mode is not enable. So, if you, heroic engineer of the future, decide to rip these out, please be sure to check out focus and keyboards. --> - + android:layout_margin="4dp" + android:foreground="?android:attr/selectableItemBackground" + android:clickable="true" + android:focusable="true" + app:cardElevation="0dp"> - + diff --git a/res/layout/item_doc_list.xml b/res/layout/item_doc_list.xml index ce8925dd2..bcc624808 100644 --- a/res/layout/item_doc_list.xml +++ b/res/layout/item_doc_list.xml @@ -20,6 +20,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_background" + android:foreground="?android:attr/selectableItemBackground" + android:clickable="true" android:focusable="true" android:orientation="vertical"> -- cgit v1.2.3-59-g8ed1b