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

Commit 465560d3 authored by Arc Wang's avatar Arc Wang
Browse files

Shows ripple effect inside CardPreference's rounded rectangle

contextual_card_background is a drawable which shows ripple.
Sets contextual_card_background as the foreground of
MaterialCardView.

Bug: 191617809
Test: manual visual
Change-Id: I09ee886fe56e443626042682381560ed0f32d51d
parent 73f539ed
Loading
Loading
Loading
Loading
+12 −13
Original line number Diff line number Diff line
@@ -15,20 +15,19 @@
  limitations under the License.
  -->

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
<com.google.android.material.card.MaterialCardView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="8dp"
    android:foreground="@drawable/contextual_card_background"
    android:clickable="true"
    style="@style/ContextualCardStyle">

    <include
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="-8dp"
        layout="@layout/settingslib_preference"/>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>