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

Commit 820471e2 authored by Edgar Wang's avatar Edgar Wang Committed by Android (Google) Code Review
Browse files

Merge "[Expressive design] Add suggestion card style" into main

parents 8e88b15b 9db22364
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2025 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<ripple xmlns:android="http://schemas.android.com/apk/res/android"
    android:color="?android:colorControlHighlight">
    <item>
        <shape android:shape="rectangle">
            <solid
                android:color="@color/settingslib_materialColorSecondary" />
            <corners
                android:radius="@dimen/settingslib_expressive_radius_extralarge3" />
        </shape>
    </item>
</ripple>
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@
            android:layout_height="@dimen/settingslib_expressive_space_medium4"
            android:padding="@dimen/settingslib_expressive_space_extrasmall4"
            android:layout_gravity="center"
            android:scaleType="centerInside"
            android:tint="@color/settingslib_materialColorSecondary" />

    </LinearLayout>
+84 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2025 The Android Open Source Project

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
    android:paddingVertical="@dimen/settingslib_expressive_space_extrasmall4">

    <LinearLayout
        android:id="@+id/card_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:baselineAligned="false"
        android:minHeight="@dimen/settingslib_expressive_space_large3"
        android:paddingStart="@dimen/settingslib_expressive_space_small1"
        android:paddingEnd="@dimen/settingslib_expressive_space_extrasmall6"
        android:orientation="horizontal"
        android:gravity="center_vertical"
        android:background="@drawable/settingslib_suggestion_card_preference_background">

        <LinearLayout
            android:id="@+id/icon_frame"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:minWidth="@dimen/settingslib_expressive_space_medium3"
            android:minHeight="@dimen/settingslib_expressive_space_medium3"
            android:gravity="center">
            <ImageView
                android:id="@android:id/icon"
                android:layout_width="@dimen/settingslib_expressive_space_medium3"
                android:layout_height="@dimen/settingslib_expressive_space_medium3"
                android:scaleType="centerInside"
                android:importantForAccessibility="no"/>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/text_container"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:paddingStart="@dimen/settingslib_expressive_space_extrasmall6"
            android:paddingVertical="@dimen/settingslib_expressive_space_small1"
            android:orientation="vertical">
            <TextView
                android:id="@android:id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="@style/TextAppearance.CardTitle.SettingsLib"
                android:textColor="@color/settingslib_materialColorOnSecondary"/>
            <TextView
                android:id="@android:id/summary"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textAppearance="@style/TextAppearance.CardSummary.SettingsLib"
                android:textColor="@color/settingslib_materialColorOnSecondary"/>
        </LinearLayout>

        <ImageView
            android:id="@android:id/icon1"
            android:layout_width="@dimen/settingslib_expressive_space_medium4"
            android:layout_height="@dimen/settingslib_expressive_space_medium4"
            android:padding="@dimen/settingslib_expressive_space_extrasmall4"
            android:layout_gravity="center"
            android:scaleType="centerInside"
            android:tint="@color/settingslib_materialColorOnSecondary" />

    </LinearLayout>
</LinearLayout>
 No newline at end of file