styles.xml 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. </style>
  39. <style name="HomeSettings.CategoryStyle" parent="@style/Preference.Category.Material">
  40. <item name="allowDividerAbove">@bool/home_settings_allow_divider</item>
  41. <item name="allowDividerBelow">@bool/home_settings_allow_divider</item>
  42. <item name="iconSpaceReserved">@bool/home_settings_icon_space_reserved</item>
  43. </style>
  44. <style name="HomeSettings.PreferenceStyle" parent="@style/Preference.Material">
  45. <item name="iconSpaceReserved">@bool/home_settings_icon_space_reserved</item>
  46. </style>
  47. <style name="HomeSettings.PreferenceScreenStyle"
  48. parent="@style/Preference.PreferenceScreen.Material">
  49. <item name="iconSpaceReserved">@bool/home_settings_icon_space_reserved</item>
  50. </style>
  51. <style name="HomeSettings.SwitchPreferenceStyle"
  52. parent="@style/Preference.SwitchPreference.Material">
  53. <item name="iconSpaceReserved">@bool/home_settings_icon_space_reserved</item>
  54. </style>
  55. <style name="HomeSettings.SwitchStyle"
  56. parent="@android:style/Widget.Material.CompoundButton.Switch">
  57. <item name="android:switchMinWidth">52dp</item>
  58. <item name="android:thumb">@drawable/home_settings_switch_thumb</item>
  59. <item name="android:track">@drawable/home_settings_switch_track</item>
  60. </style>
  61. <style name="HomeSettings.PreferenceTitle"
  62. parent="@android:style/TextAppearance.Material.Subhead">
  63. <item name="android:fontFamily">google-sans</item>
  64. <item name="android:textSize">20sp</item>
  65. </style>
  66. <style name="HomeSettings.CategoryTitle" parent="@android:style/TextAppearance.Material.Body2">
  67. <item name="android:fontFamily">google-sans-text-medium</item>
  68. </style>
  69. <style name="HomeSettings.CollapsingToolbar" parent="@style/Theme.MaterialComponents.DayNight">
  70. <item name="colorAccent">@color/home_settings_header_accent</item>
  71. <item name="colorPrimary">@color/home_settings_header_expanded</item>
  72. <item name="elevationOverlayColor">?attr/colorPrimary</item>
  73. <item name="elevationOverlayEnabled">true</item>
  74. </style>
  75. <style name="HomeSettings.CollapsedToolbarTitle"
  76. parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title">
  77. <item name="android:fontFamily">google-sans</item>
  78. </style>
  79. <style name="HomeSettings.ExpandedToolbarTitle" parent="HomeSettings.CollapsedToolbarTitle">
  80. <item name="android:textSize">36sp</item>
  81. </style>
  82. </resources>