Files
app_Settings/res/layout/expressive_preference_circular_icons.xml
Edgar Wang e0773a6a59 Update widget layout of Preferences
- min width should be 48dp
- widget should not add paddingStart/End

Bug: 418025176
Test: atest & visual
Flag: EXEMPT resource update
Change-Id: Icfb8d94469a0da1f112dc3f8ce4d4d03003b1aec
2025-05-28 07:09:08 -07:00

87 lines
3.7 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.
-->
<!-- Fork of settingslib_expressive_preference_two_target.xml, with the added CircularIconsView. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeightSmall"
android:gravity="center_vertical"
android:background="?android:attr/selectableItemBackground"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:clipToPadding="false">
<include layout="@layout/settingslib_expressive_preference_icon_frame"/>
<RelativeLayout
android:layout_width="@dimen/settingslib_expressive_space_none"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingVertical="@dimen/settingslib_expressive_space_small1"
android:paddingStart="@dimen/settingslib_expressive_space_none"
android:paddingEnd="@dimen/settingslib_expressive_space_small1"
android:filterTouchesWhenObscured="false">
<TextView
android:id="@android:id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:textAlignment="viewStart"
android:maxLines="2"
android:textAppearance="?android:attr/textAppearanceListItem"
android:ellipsize="marquee"/>
<TextView
android:id="@android:id/summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@android:id/title"
android:layout_alignStart="@android:id/title"
android:layout_gravity="start"
android:textAlignment="viewStart"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
android:maxLines="10"/>
<!-- Circular icons (32dp) will be ImageViews under this container -->
<com.android.settings.notification.modes.CircularIconsView
android:id="@+id/circles_container"
android:importantForAccessibility="noHideDescendants"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_below="@android:id/summary"
android:layout_alignStart="@android:id/title" />
</RelativeLayout>
<include layout="@layout/settingslib_expressive_two_target_divider" />
<!-- Preference should place its actual preference widget here. -->
<LinearLayout
android:id="@android:id/widget_frame"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:minWidth="@dimen/settingslib_expressive_space_medium4"
android:gravity="center"
android:orientation="vertical" />
</LinearLayout>