fix: 首次提交
This commit is contained in:
85
SettingsLib/SettingsTheme/res/values-v31/colors.xml
Normal file
85
SettingsLib/SettingsTheme/res/values-v31/colors.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?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>
|
||||
<!-- Material next state on color-->
|
||||
<color name="settingslib_state_on_color">@android:color/system_accent1_100</color>
|
||||
|
||||
<!-- Material next state off color-->
|
||||
<color name="settingslib_state_off_color">@android:color/system_accent2_100</color>
|
||||
|
||||
<!-- Material next thumb disable color-->
|
||||
<color name="settingslib_thumb_disabled_color">@android:color/system_neutral2_100</color>
|
||||
|
||||
<!-- Material next thumb off color-->
|
||||
<color name="settingslib_thumb_off_color">@android:color/system_neutral2_300</color>
|
||||
|
||||
<!-- Material next track on color-->
|
||||
<color name="settingslib_track_on_color">@android:color/system_accent1_600</color>
|
||||
|
||||
<!-- Material next track off color-->
|
||||
<color name="settingslib_track_off_color">@color/settingslib_switch_track_off</color>
|
||||
|
||||
<!-- Dialog accent color -->
|
||||
<color name="settingslib_dialog_accent">@android:color/system_accent1_600</color>
|
||||
<!-- Dialog background color -->
|
||||
<color name="settingslib_dialog_background">@color/settingslib_surface_light</color>
|
||||
<!-- Dialog error color. -->
|
||||
<color name="settingslib_dialog_colorError">#d93025</color> <!-- Red 600 -->
|
||||
|
||||
<color name="settingslib_colorSurfaceVariant">@android:color/system_neutral2_100</color>
|
||||
|
||||
<color name="settingslib_colorSurfaceHeader">@android:color/system_neutral1_100</color>
|
||||
|
||||
<color name="settingslib_accent_device_default_dark">@android:color/system_accent1_100</color>
|
||||
|
||||
<color name="settingslib_accent_device_default_light">@android:color/system_accent1_600</color>
|
||||
|
||||
<color name="settingslib_primary_dark_device_default_settings">@android:color/system_neutral1_900</color>
|
||||
|
||||
<color name="settingslib_primary_device_default_settings_light">@android:color/system_neutral1_50</color>
|
||||
|
||||
<color name="settingslib_accent_primary_device_default">@android:color/system_accent1_100</color>
|
||||
|
||||
<!-- copy from accent_primary_variant_light_device_default-->
|
||||
<color name="settingslib_accent_primary_variant">@android:color/system_accent1_600</color>
|
||||
|
||||
<color name="settingslib_accent_secondary_device_default">@android:color/system_accent2_100</color>
|
||||
|
||||
<color name="settingslib_background_device_default_dark">@android:color/system_neutral1_900</color>
|
||||
|
||||
<color name="settingslib_background_device_default_light">@android:color/system_neutral1_50</color>
|
||||
|
||||
<color name="settingslib_text_color_primary_device_default">@android:color/system_neutral1_900</color>
|
||||
|
||||
<color name="settingslib_text_color_secondary_device_default">@android:color/system_neutral2_700</color>
|
||||
|
||||
<color name="settingslib_text_color_preference_category_title">@android:color/system_accent1_600</color>
|
||||
|
||||
<color name="settingslib_ripple_color">?android:attr/colorControlHighlight</color>
|
||||
|
||||
<color name="settingslib_material_grey_900">#ff212121</color>
|
||||
|
||||
<color name="settingslib_colorAccentPrimary">@color/settingslib_accent_primary_device_default</color>
|
||||
|
||||
<color name="settingslib_colorAccentSecondary">@color/settingslib_accent_secondary_device_default</color>
|
||||
|
||||
<color name="settingslib_colorSurface">@color/settingslib_surface_light</color>
|
||||
|
||||
<color name="settingslib_spinner_title_color">@android:color/system_neutral1_900</color>
|
||||
<color name="settingslib_spinner_dropdown_color">@android:color/system_neutral2_700</color>
|
||||
</resources>
|
||||
22
SettingsLib/SettingsTheme/res/values-v31/config.xml
Normal file
22
SettingsLib/SettingsTheme/res/values-v31/config.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<bool name="settingslib_config_icon_space_reserved">false</bool>
|
||||
<bool name="settingslib_config_allow_divider">false</bool>
|
||||
<!-- Name of a font family to use for headlines in SettingsLib. -->
|
||||
<string name="settingslib_config_headlineFontFamily" translatable="false"></string>
|
||||
</resources>
|
||||
28
SettingsLib/SettingsTheme/res/values-v31/dimens.xml
Normal file
28
SettingsLib/SettingsTheme/res/values-v31/dimens.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2019 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>
|
||||
<dimen name="app_preference_padding_start">20dp</dimen>
|
||||
<dimen name="app_icon_min_width">52dp</dimen>
|
||||
<dimen name="settingslib_preferred_minimum_touch_target">48dp</dimen>
|
||||
<dimen name="settingslib_dialogCornerRadius">28dp</dimen>
|
||||
|
||||
<!-- Left padding of the preference -->
|
||||
<dimen name="settingslib_listPreferredItemPaddingStart">24dp</dimen>
|
||||
<!-- Right padding of the preference -->
|
||||
<dimen name="settingslib_listPreferredItemPaddingEnd">24dp</dimen>
|
||||
</resources>
|
||||
@@ -0,0 +1,80 @@
|
||||
<?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="PreferenceTheme.SettingsLib" parent="@style/PreferenceThemeOverlay">
|
||||
<item name="preferenceCategoryTitleTextAppearance">@style/TextAppearance.CategoryTitle.SettingsLib</item>
|
||||
<item name="preferenceScreenStyle">@style/SettingsPreferenceScreen.SettingsLib</item>
|
||||
<item name="preferenceCategoryStyle">@style/SettingsCategoryPreference.SettingsLib</item>
|
||||
<item name="preferenceStyle">@style/SettingsPreference.SettingsLib</item>
|
||||
<item name="checkBoxPreferenceStyle">@style/SettingsCheckBoxPreference.SettingsLib</item>
|
||||
<item name="dialogPreferenceStyle">@style/SettingsPreference.SettingsLib</item>
|
||||
<item name="editTextPreferenceStyle">@style/SettingsEditTextPreference.SettingsLib</item>
|
||||
<item name="dropdownPreferenceStyle">@style/SettingsDropdownPreference.SettingsLib</item>
|
||||
<item name="switchPreferenceStyle">@style/SettingsSwitchPreference.SettingsLib</item>
|
||||
<item name="switchPreferenceCompatStyle">@style/SettingsSwitchPreferenceCompat.SettingsLib</item>
|
||||
<item name="seekBarPreferenceStyle">@style/SettingsSeekbarPreference.SettingsLib</item>
|
||||
<item name="footerPreferenceStyle">@style/Preference.Material</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsPreferenceScreen.SettingsLib" parent="@style/Preference.PreferenceScreen.Material">
|
||||
<item name="layout">@layout/settingslib_preference</item>
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsCategoryPreference.SettingsLib" parent="@style/Preference.Category.Material">
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
<item name="allowDividerAbove">@bool/settingslib_config_allow_divider</item>
|
||||
<item name="allowDividerBelow">@bool/settingslib_config_allow_divider</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsPreference.SettingsLib" parent="@style/Preference.Material">
|
||||
<item name="layout">@layout/settingslib_preference</item>
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsCheckBoxPreference.SettingsLib" parent="@style/Preference.CheckBoxPreference.Material">
|
||||
<item name="layout">@layout/settingslib_preference</item>
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsEditTextPreference.SettingsLib"
|
||||
parent="@style/Preference.DialogPreference.EditTextPreference.Material">
|
||||
<item name="layout">@layout/settingslib_preference</item>
|
||||
<item name="dialogLayout">@layout/settingslib_preference_dialog_edittext</item>
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsDropdownPreference.SettingsLib" parent="@style/Preference.DropDown.Material">
|
||||
<item name="layout">@layout/settingslib_dropdown_preference</item>
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsSwitchPreference.SettingsLib" parent="@style/Preference.SwitchPreference.Material">
|
||||
<item name="layout">@layout/settingslib_preference</item>
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsSwitchPreferenceCompat.SettingsLib" parent="@style/Preference.SwitchPreferenceCompat.Material">
|
||||
<item name="layout">@layout/settingslib_preference</item>
|
||||
<item name="singleLineTitle">false</item>
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
</style>
|
||||
|
||||
<style name="SettingsSeekbarPreference.SettingsLib" parent="@style/Preference.SeekBarPreference.Material">
|
||||
<item name="iconSpaceReserved">@bool/settingslib_config_icon_space_reserved</item>
|
||||
</style>
|
||||
</resources>
|
||||
52
SettingsLib/SettingsTheme/res/values-v31/styles.xml
Normal file
52
SettingsLib/SettingsTheme/res/values-v31/styles.xml
Normal file
@@ -0,0 +1,52 @@
|
||||
<?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.PreferenceTitle.SettingsLib"
|
||||
parent="@android:style/TextAppearance.Material.Subhead">
|
||||
<item name="android:textColor">@color/settingslib_text_color_primary</item>
|
||||
<item name="android:fontFamily">@string/settingslib_config_headlineFontFamily</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.PreferenceSummary.SettingsLib"
|
||||
parent="@android:style/TextAppearance.DeviceDefault.Small">
|
||||
<item name="android:textColor">@color/settingslib_text_color_secondary</item>
|
||||
</style>
|
||||
|
||||
<style name="TextAppearance.CategoryTitle.SettingsLib"
|
||||
parent="@android:style/TextAppearance.DeviceDefault.Medium">
|
||||
<item name="android:textColor">@color/settingslib_text_color_preference_category_title</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
</style>
|
||||
|
||||
<style name="Switch.SettingsLib" parent="@android:style/Widget.Material.CompoundButton.Switch">
|
||||
<item name="android:minHeight">@dimen/settingslib_preferred_minimum_touch_target</item>
|
||||
<item name="android:track">@drawable/settingslib_switch_track</item>
|
||||
<item name="android:thumb">@drawable/settingslib_switch_thumb</item>
|
||||
</style>
|
||||
|
||||
<style name="SwitchCompat.SettingsLib" parent="@style/Widget.AppCompat.CompoundButton.Switch">
|
||||
<item name="android:minHeight">@dimen/settingslib_preferred_minimum_touch_target</item>
|
||||
<item name="track">@drawable/settingslib_switch_track</item>
|
||||
<item name="android:thumb">@drawable/settingslib_switch_thumb</item>
|
||||
</style>
|
||||
|
||||
<style name="HorizontalProgressBar.SettingsLib"
|
||||
parent="android:style/Widget.Material.ProgressBar.Horizontal">
|
||||
<item name="android:progressDrawable">@drawable/settingslib_progress_horizontal</item>
|
||||
</style>
|
||||
</resources>
|
||||
58
SettingsLib/SettingsTheme/res/values-v31/themes.xml
Normal file
58
SettingsLib/SettingsTheme/res/values-v31/themes.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?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>
|
||||
<!-- Only using in Settings application -->
|
||||
<style name="Theme.SettingsBase_v31" parent="@android:style/Theme.DeviceDefault.Settings" >
|
||||
<item name="android:textAppearanceListItem">@style/TextAppearance.PreferenceTitle.SettingsLib</item>
|
||||
<item name="android:listPreferredItemPaddingStart">@dimen/settingslib_listPreferredItemPaddingStart</item>
|
||||
<item name="android:listPreferredItemPaddingLeft">@dimen/settingslib_listPreferredItemPaddingStart</item>
|
||||
<item name="android:listPreferredItemPaddingEnd">16dp</item>
|
||||
<item name="android:listPreferredItemPaddingRight">16dp</item>
|
||||
<item name="preferenceTheme">@style/PreferenceTheme.SettingsLib</item>
|
||||
<item name="android:switchStyle">@style/Switch.SettingsLib</item>
|
||||
<item name="switchStyle">@style/SwitchCompat.SettingsLib</item>
|
||||
<item name="android:progressBarStyleHorizontal">@style/HorizontalProgressBar.SettingsLib</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.SettingsBase" parent="Theme.SettingsBase_v31" />
|
||||
|
||||
<!-- Using in SubSettings page including injected settings page -->
|
||||
<style name="Theme.SubSettingsBase" parent="Theme.SettingsBase">
|
||||
<!-- Suppress the built-in action bar -->
|
||||
<item name="android:windowActionBar">false</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<!-- Set up edge-to-edge configuration for top app bar -->
|
||||
<item name="android:navigationBarColor">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="colorControlNormal">?android:attr/colorControlNormal</item>
|
||||
<!-- For AndroidX AlertDialog -->
|
||||
<item name="alertDialogTheme">@style/Theme.AlertDialog.SettingsLib</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.AlertDialog.SettingsLib" parent="@style/Theme.AppCompat.DayNight.Dialog.Alert">
|
||||
<item name="colorAccent">@color/settingslib_dialog_accent</item>
|
||||
<item name="android:colorError">@color/settingslib_dialog_colorError</item>
|
||||
<item name="android:colorBackground">@color/settingslib_dialog_background</item>
|
||||
|
||||
<item name="android:windowSoftInputMode">adjustResize</item>
|
||||
<item name="android:clipToPadding">true</item>
|
||||
<item name="android:clipChildren">true</item>
|
||||
|
||||
<item name="dialogCornerRadius">@dimen/settingslib_dialogCornerRadius</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user