Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d988caf authored by Zemiao Zhu's avatar Zemiao Zhu
Browse files

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
parent c7e0c485
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -19,7 +19,9 @@
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:attr/selectableItemBackground"
    android:background="@drawable/list_item_background"
    android:foreground="?android:attr/selectableItemBackground"
    android:clickable="true"
    android:focusable="true"
    android:orientation="horizontal" >

@@ -43,6 +45,7 @@

            <com.google.android.material.card.MaterialCardView
                app:cardElevation="0dp"
                app:cardBackgroundColor="@android:color/transparent"
                android:layout_width="match_parent"
                android:layout_height="match_parent">

+7 −6
Original line number Diff line number Diff line
@@ -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. -->
<FrameLayout
<com.google.android.material.card.MaterialCardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/item_root"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="2dp"
    android:focusable="true">
    android:layout_margin="4dp"
    android:foreground="?android:attr/selectableItemBackground"
    android:clickable="true"
    android:focusable="true"
    app:cardElevation="0dp">

    <com.google.android.material.card.MaterialCardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="2dp"
        android:elevation="0dp"
        android:duplicateParentState="true"
        app:cardElevation="0dp"
@@ -106,9 +108,8 @@
    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="1dp"
        android:background="@drawable/item_doc_grid_border_rounded"
        android:contentDescription="@null"
        android:duplicateParentState="true"/>

</FrameLayout>
 No newline at end of file
</com.google.android.material.card.MaterialCardView>
 No newline at end of file
+7 −6
Original line number Diff line number Diff line
@@ -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. -->
<FrameLayout
<com.google.android.material.card.MaterialCardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/item_root"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="2dp"
    android:focusable="true">
    android:layout_margin="4dp"
    android:foreground="?android:attr/selectableItemBackground"
    android:clickable="true"
    android:focusable="true"
    app:cardElevation="0dp">

    <com.google.android.material.card.MaterialCardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_margin="2dp"
        android:elevation="0dp"
        android:duplicateParentState="true"
        app:cardElevation="0dp"
@@ -199,9 +201,8 @@
    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_margin="1dp"
        android:background="@drawable/item_doc_grid_border_rounded"
        android:contentDescription="@null"
        android:duplicateParentState="true"/>

</FrameLayout>
</com.google.android.material.card.MaterialCardView>
+2 −0
Original line number Diff line number Diff line
@@ -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">