diff options
author | 2025-03-20 00:11:18 -0700 | |
---|---|---|
committer | 2025-03-20 00:11:18 -0700 | |
commit | d4803f4610ac6be7e93a7960c6541f6f401297f2 (patch) | |
tree | c4b75b503d32ca6c85a16d9cbde069abd78a8abf /packages/SettingsLib | |
parent | 26ced0b88489247f151dbe8b23c019f8edc97551 (diff) | |
parent | 40588095f9f145c71df475d8ec99228e84cff2de (diff) |
Merge "[Expressive design] Update PreferenceCategory layout" into main
Diffstat (limited to 'packages/SettingsLib')
2 files changed, 43 insertions, 0 deletions
diff --git a/packages/SettingsLib/SettingsTheme/res/layout-v36/settingslib_expressive_preference_category.xml b/packages/SettingsLib/SettingsTheme/res/layout-v36/settingslib_expressive_preference_category.xml new file mode 100644 index 000000000000..44b8e7c96a88 --- /dev/null +++ b/packages/SettingsLib/SettingsTheme/res/layout-v36/settingslib_expressive_preference_category.xml @@ -0,0 +1,42 @@ +<?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:paddingLeft="?android:attr/listPreferredItemPaddingLeft" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingRight="?android:attr/listPreferredItemPaddingRight" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:background="?android:attr/selectableItemBackground" + android:baselineAligned="false" + android:layout_marginTop="@dimen/settingslib_expressive_space_small1" + android:gravity="center_vertical" + android:filterTouchesWhenObscured="false"> + + <TextView + android:id="@android:id/title" + android:paddingStart="@dimen/settingslib_expressive_space_extrasmall4" + android:paddingTop="@dimen/settingslib_expressive_space_extrasmall4" + android:paddingBottom="@dimen/settingslib_expressive_space_extrasmall4" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_gravity="start" + android:textAlignment="viewStart" + style="@style/PreferenceCategoryTitleTextStyle"/> +</LinearLayout>
\ No newline at end of file diff --git a/packages/SettingsLib/SettingsTheme/res/values-v36/styles_preference_expressive.xml b/packages/SettingsLib/SettingsTheme/res/values-v36/styles_preference_expressive.xml index cec8e45e2bfb..ec6fe887d31e 100644 --- a/packages/SettingsLib/SettingsTheme/res/values-v36/styles_preference_expressive.xml +++ b/packages/SettingsLib/SettingsTheme/res/values-v36/styles_preference_expressive.xml @@ -40,6 +40,7 @@ </style> <style name="SettingsLibPreference.Category.Expressive"> + <item name="layout">@layout/settingslib_expressive_preference_category</item> </style> <style name="SettingsLibPreference.CheckBoxPreference.Expressive"> |