styles.xml 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. /*
  4. * Copyright (C) 2021 The Android Open Source Project
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. */
  18. -->
  19. <resources>
  20. <style name="HomeSettings.Theme" parent="@android:style/Theme.DeviceDefault.Settings">
  21. <item name="android:listPreferredItemPaddingEnd">16dp</item>
  22. <item name="android:listPreferredItemPaddingStart">24dp</item>
  23. <item name="android:navigationBarColor">@android:color/transparent</item>
  24. <item name="android:statusBarColor">@android:color/transparent</item>
  25. <item name="android:switchStyle">@style/HomeSettings.SwitchStyle</item>
  26. <item name="android:textAppearanceListItem">@style/HomeSettings.PreferenceTitle</item>
  27. <item name="android:windowActionBar">false</item>
  28. <item name="android:windowNoTitle">true</item>
  29. <item name="preferenceTheme">@style/HomeSettings.PreferenceTheme</item>
  30. </style>
  31. <style name="HomeSettings.PreferenceTheme" parent="@style/PreferenceThemeOverlay">
  32. <item name="preferenceCategoryStyle">@style/HomeSettings.CategoryStyle</item>
  33. <item name="preferenceCategoryTitleTextAppearance">@style/HomeSettings.CategoryTitle</item>
  34. <item name="preferenceFragmentCompatStyle">@style/HomeSettings.FragmentCompatStyle</item>
  35. <item name="preferenceScreenStyle">@style/HomeSettings.PreferenceScreenStyle</item>
  36. <item name="preferenceStyle">@style/HomeSettings.PreferenceStyle</item>
  37. <item name="switchPreferenceStyle">@style/HomeSettings.SwitchPreferenceStyle</item>
  38. <item name="android:fontFamily">google-sans-text</item>
  39. </style>
  40. <style name="HomeSettings.CategoryStyle" parent="@style/Preference.Category.Material">
  41. <item name="allowDividerAbove">@bool/home_settings_allow_divider</item>
  42. <item name="allowDividerBelow">@bool/home_settings_allow_divider</item>
  43. <item name="iconSpaceReserved">@bool/home_settings_icon_space_reserved</item>
  44. </style>
  45. <style name="HomeSettings.PreferenceStyle" parent="@style/Preference.Material">
  46. <item name="iconSpaceReserved">@bool/home_settings_icon_space_reserved</item>
  47. </style>
  48. <style name="HomeSettings.PreferenceScreenStyle"
  49. parent="@style/Preference.PreferenceScreen.Material">
  50. <item name="iconSpaceReserved">@bool/home_settings_icon_space_reserved</item>
  51. </style>
  52. <style name="HomeSettings.SwitchPreferenceStyle"
  53. parent="@style/Preference.SwitchPreference.Material">
  54. <item name="iconSpaceReserved">@bool/home_settings_icon_space_reserved</item>
  55. </style>
  56. <style name="HomeSettings.SwitchStyle"
  57. parent="@android:style/Widget.Material.CompoundButton.Switch">
  58. <item name="android:switchMinWidth">52dp</item>
  59. <item name="android:thumb">@drawable/home_settings_switch_thumb</item>
  60. <item name="android:track">@drawable/home_settings_switch_track</item>
  61. </style>
  62. <style name="HomeSettings.PreferenceTitle"
  63. parent="@android:style/TextAppearance.Material.Subhead">
  64. <item name="android:fontFamily">google-sans</item>
  65. <item name="android:textSize">20sp</item>
  66. </style>
  67. <style name="HomeSettings.CategoryTitle" parent="@android:style/TextAppearance.Material.Body2">
  68. <item name="android:fontFamily">google-sans-text-medium</item>
  69. </style>
  70. <style name="HomeSettings.CollapsingToolbar" parent="@style/Theme.MaterialComponents.DayNight">
  71. <item name="colorAccent">@color/home_settings_header_accent</item>
  72. <item name="colorPrimary">@color/home_settings_header_expanded</item>
  73. <item name="elevationOverlayColor">?attr/colorPrimary</item>
  74. <item name="elevationOverlayEnabled">true</item>
  75. </style>
  76. <style name="HomeSettings.CollapsedToolbarTitle"
  77. parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title">
  78. <item name="android:fontFamily">google-sans</item>
  79. <item name="android:textSize">20sp</item>
  80. </style>
  81. <style name="HomeSettings.ExpandedToolbarTitle" parent="HomeSettings.CollapsedToolbarTitle">
  82. <item name="android:textSize">36sp</item>
  83. </style>
  84. </resources>