- Change text appearance - Correct the position of icon Bug: 408643725 Test: visual test Flag: EXEMPT UI polish Change-Id: I8b9077870992c7127140f44b14a26fd8ce5abd33
107 lines
4.1 KiB
XML
107 lines
4.1 KiB
XML
<?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"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:gravity="center_vertical"
|
|
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
|
|
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
|
|
android:orientation="horizontal"
|
|
android:background="?android:attr/selectableItemBackground"
|
|
android:clipToPadding="false"
|
|
android:baselineAligned="false">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:paddingVertical="@dimen/settingslib_expressive_space_small1">
|
|
|
|
<!-- Title -->
|
|
<TextView
|
|
android:id="@android:id/title"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="start"
|
|
android:textAlignment="viewStart"
|
|
android:textAppearance="@style/TextAppearance.SettingsLib.TitleMedium"
|
|
android:textColor="@color/settingslib_text_color_primary"
|
|
android:maxLines="2"
|
|
android:ellipsize="marquee"/>
|
|
|
|
<!-- Summary -->
|
|
<TextView
|
|
android:id="@android:id/summary"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@android:id/title"
|
|
android:layout_alignLeft="@android:id/title"
|
|
android:layout_alignStart="@android:id/title"
|
|
android:layout_gravity="start"
|
|
android:textAlignment="viewStart"
|
|
android:textAppearance="@style/TextAppearance.SettingsLib.TitleMedium"
|
|
android:textColor="@color/settingslib_text_color_secondary"
|
|
android:maxLines="10"/>
|
|
|
|
<!-- Slider -->
|
|
<include
|
|
layout="@layout/settingslib_expressive_layout_slider"
|
|
android:id="@+id/slider_frame"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignStart="@android:id/summary"
|
|
android:layout_below="@android:id/summary"/>
|
|
|
|
<TextView
|
|
android:id="@+id/suppression_text"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center_vertical|start"
|
|
android:layout_below="@id/slider_frame"
|
|
android:textAlignment="viewStart"
|
|
android:singleLine="true"
|
|
android:ellipsize="end"
|
|
android:visibility="gone"
|
|
android:textAppearance="@style/TextAppearance.SettingsLib.TitleMedium"
|
|
android:textColor="@color/settingslib_text_color_secondary"/>
|
|
|
|
</RelativeLayout>
|
|
|
|
<!-- Icon -->
|
|
<LinearLayout
|
|
android:id="@+id/icon_frame"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="@dimen/settingslib_expressive_space_extrasmall5"
|
|
android:minWidth="48dp"
|
|
android:minHeight="48dp"
|
|
android:gravity="center"
|
|
android:orientation="horizontal">
|
|
|
|
<ImageView
|
|
android:id="@android:id/icon"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:scaleType="fitCenter"
|
|
app:maxWidth="48dp"
|
|
app:maxHeight="48dp"/>
|
|
|
|
</LinearLayout>
|
|
</LinearLayout> |