diff options
author | 2022-05-12 00:29:14 +0800 | |
---|---|---|
committer | 2022-05-13 19:05:42 +0800 | |
commit | c93c5b8fedd3dbefcbab35b44b526419f262c95a (patch) | |
tree | 5042c1bef0ff9625f441b99bdf722e57a514c5f5 | |
parent | 4b33be9fbdff890be5893f6be914a2d5029ddb79 (diff) |
[Panlingual] Add a new layout for top intro on app preferences
Bug: b/230689178
Test: local, see b/230689178
Change-Id: I84f8fbc1f2555867b7f0b3c1838dd66a546e7e18
4 files changed, 44 insertions, 23 deletions
diff --git a/packages/SettingsLib/AppPreference/res/layout/preference_app_header.xml b/packages/SettingsLib/AppPreference/res/layout/preference_app_header.xml new file mode 100644 index 000000000000..e0d01f9bb2c3 --- /dev/null +++ b/packages/SettingsLib/AppPreference/res/layout/preference_app_header.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2022 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:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:paddingStart="?android:attr/listPreferredItemPaddingStart" + android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" + android:paddingBottom="16dp" + android:paddingTop="8dp" + android:clickable="false"> + + <TextView + android:id="@+id/apps_top_intro_text" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:textDirection="locale" + android:clickable="false" + android:longClickable="false" + android:textAppearance="@style/TextAppearance.TopIntroText" /> + +</LinearLayout> diff --git a/packages/SettingsLib/SettingsTheme/res/values/styles.xml b/packages/SettingsLib/SettingsTheme/res/values/styles.xml index aaab0f041fe3..00bd14122251 100644 --- a/packages/SettingsLib/SettingsTheme/res/values/styles.xml +++ b/packages/SettingsLib/SettingsTheme/res/values/styles.xml @@ -26,4 +26,11 @@ <style name="TextAppearance.CategoryTitle.SettingsLib" parent="@android:style/TextAppearance.DeviceDefault.Medium"> </style> + + <style name="TextAppearance.TopIntroText" + parent="@android:style/TextAppearance.DeviceDefault"> + <item name="android:textSize">14sp</item> + <item name="android:textColor">?android:attr/textColorSecondary</item> + </style> + </resources> diff --git a/packages/SettingsLib/TopIntroPreference/Android.bp b/packages/SettingsLib/TopIntroPreference/Android.bp index cd0bdea9425f..ecf2a72021ed 100644 --- a/packages/SettingsLib/TopIntroPreference/Android.bp +++ b/packages/SettingsLib/TopIntroPreference/Android.bp @@ -16,6 +16,7 @@ android_library { static_libs: [ "androidx.annotation_annotation", "androidx.preference_preference", + "SettingsLibSettingsTheme", ], sdk_version: "system_current", min_sdk_version: "21", diff --git a/packages/SettingsLib/TopIntroPreference/res/values/styles.xml b/packages/SettingsLib/TopIntroPreference/res/values/styles.xml deleted file mode 100644 index b6ca41fb6b6d..000000000000 --- a/packages/SettingsLib/TopIntroPreference/res/values/styles.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2021 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. - --> -<resources> - <style name="TextAppearance.TopIntroText" - parent="@android:style/TextAppearance.DeviceDefault"> - <item name="android:textSize">14sp</item> - <item name="android:textColor">?android:attr/textColorSecondary</item> - </style> -</resources> |