Files
app_Settings/res/layout/suggestion_tile.xml
Stefan Maftei b1870c9a60 [Expressive design] Remove extra padding from Settings Homepage
Bug: 419675235
Test: atest SettingsHomepageActivityTest, and visual
Flag: EXEMPT resource update

Change-Id: I3f8f97e96056ae8919ecf197e64ed637d3c551f7
Signed-off-by: Stefan Maftei <smaftei@google.com>
2025-05-28 07:50:15 -07:00

95 lines
3.9 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2024 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.
-->
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/suggestion_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/settingslib_expressive_space_small1"
style="@style/SuggestionCardStyle">
<LinearLayout
android:id="@+id/card_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="false"
android:minHeight="72dp"
android:paddingStart="@dimen/settingslib_expressive_space_small1"
android:paddingEnd="@dimen/settingslib_expressive_space_extrasmall6"
android:orientation="horizontal"
android:gravity="center_vertical"
android:background="?android:attr/selectableItemBackground">
<FrameLayout
android:id="@android:id/icon_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:ignore="ContentDescription">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/suggestion_icon_background"/>
<ImageView
android:id="@android:id/icon"
android:layout_width="@dimen/settingslib_expressive_space_small4"
android:layout_height="@dimen/settingslib_expressive_space_small4"
android:layout_gravity="center"/>
</FrameLayout>
<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.SuggestionCardTitle"/>
<TextView
android:id="@android:id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.SuggestionCardSummary"/>
</LinearLayout>
<ImageView
android:id="@android:id/closeButton"
android:layout_width="@dimen/settingslib_expressive_space_medium4"
android:layout_height="@dimen/settingslib_expressive_space_medium4"
android:padding="@dimen/settingslib_expressive_space_extrasmall4"
android:visibility="gone"
android:layout_gravity="center"
android:contentDescription="@string/suggestion_button_close"
android:src="@drawable/ic_suggestion_close_button"
android:tint="@color/settingslib_materialColorPrimaryContainer"
android:background="?android:attr/selectableItemBackground" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>