Commit 4fa34add authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Remove unused Preference themes, styles, layouts

There are no longer any non-support library Alert Dialogs in
Preferences, so this theme can be removed from this activity (but is
still necessary on other activities).

The other preference-specific styles removed here were applicable only
to framework preferences and are no longer used now that all preferences
have been migrated to the support library.

Bug: 967022
Change-Id: Id367c240486b8f4bf6b892f859cd1aba5d16da73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1711146Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682350}
parent 3a9467fd
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<!-- Emulates Android's preference_category_material.xml on pre-L devices.
Also used as the layout for IconPreferenceCategory. -->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
style="@style/PreferenceCategoryWithButtonStyle" >
<TextView
android:id="@android:id/title"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.PreferenceCategoryText" />
<!-- Users of this layout are responsible to set contentDescription. -->
<ImageView
android:id="@android:id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="@dimen/min_touch_target_size"
android:minWidth="@dimen/min_touch_target_size"
android:scaleType="center"
android:background="?android:attr/selectableItemBackground"
tools:ignore="ContentDescription" />
</LinearLayout>
\ No newline at end of file
...@@ -152,7 +152,6 @@ ...@@ -152,7 +152,6 @@
<!-- Theme attributes pre-v21 --> <!-- Theme attributes pre-v21 -->
<item name="android:textAppearanceMedium">@style/TextAppearance.PreferenceMediumText</item> <item name="android:textAppearanceMedium">@style/TextAppearance.PreferenceMediumText</item>
<item name="android:textAppearanceSmall">@style/TextAppearance.BlackBody</item> <item name="android:textAppearanceSmall">@style/TextAppearance.BlackBody</item>
<item name="android:preferenceCategoryStyle">@style/PreferenceCategory</item>
<item name="android:windowContentOverlay">@null</item> <item name="android:windowContentOverlay">@null</item>
<item name="preferenceTheme">@style/Theme.Chromium.PreferenceTheme</item> <item name="preferenceTheme">@style/Theme.Chromium.PreferenceTheme</item>
</style> </style>
...@@ -297,10 +296,10 @@ ...@@ -297,10 +296,10 @@
<item name="buttonBarButtonStyle">@style/TextAppearance.DialogButtonCompat</item> <item name="buttonBarButtonStyle">@style/TextAppearance.DialogButtonCompat</item>
</style> </style>
<!-- TODO(chouinard): Using all caps for support library preference dialog buttons to match <!-- TODO(crbug.com/971791): Using all caps for support library preference dialog buttons to
existing non-compat style, however we should later reexamine whether this is still the match existing non-compat style, however we should later reexamine whether this is still
right choice since it looks like most of our other AlertDialogs use the default title case. the right choice since it looks like most of our other AlertDialogs use the default title
--> case. -->
<style name="TextAppearance.DialogButtonCompat" parent="AlertDialogButtonStyle"> <style name="TextAppearance.DialogButtonCompat" parent="AlertDialogButtonStyle">
<item name="android:textAllCaps">true</item> <item name="android:textAllCaps">true</item>
</style> </style>
...@@ -317,21 +316,6 @@ ...@@ -317,21 +316,6 @@
<item name="android:textSize">18sp</item> <item name="android:textSize">18sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textColor">?android:attr/textColorPrimary</item>
</style> </style>
<style name="PreferenceCategory">
<item name="android:layout">@layout/preference_category</item>
<item name="android:shouldDisableView">false</item>
<item name="android:selectable">false</item>
</style>
<style name="PreferenceCategoryWithButtonStyle">
<item name="android:paddingStart">8dp</item>
<item name="android:paddingEnd">4dp</item>
<item name="android:paddingTop">16dp</item>
<item name="android:layout_marginBottom">16dp</item>
</style>
<style name="TextAppearance.PreferenceCategoryText" parent="TextAppearance.RobotoMediumStyle">
<item name="android:textColor">@color/pref_accent_color</item>
<item name="android:textSize">12sp</item>
</style>
<style name="PreferenceTitle"> <style name="PreferenceTitle">
<item name="android:ellipsize">end</item> <item name="android:ellipsize">end</item>
<item name="android:singleLine">true</item> <item name="android:singleLine">true</item>
......
...@@ -18,12 +18,6 @@ ...@@ -18,12 +18,6 @@
<!-- Preferences --> <!-- Preferences -->
<style name="Theme.Chromium.Preferences" parent="Base.Theme.Chromium.Preferences"> <style name="Theme.Chromium.Preferences" parent="Base.Theme.Chromium.Preferences">
<item name="android:divider">@null</item>
<!-- Overriding alertDialogTheme pre-v21 with our custom AlertDialog theme causes bad visual
states on ListPreference because we don't use the support library ListPreference. -->
<item name="android:alertDialogTheme">@style/Theme.Chromium.AlertDialog</item>
<!-- TODO(crbug.com/967022): Clean up the unnecessary preference alert dialog styles once
all dialog preferences are migrated to the support library. -->
<item name="alertDialogTheme">@style/Theme.Chromium.Preferences.AlertDialog</item> <item name="alertDialogTheme">@style/Theme.Chromium.Preferences.AlertDialog</item>
<item name="preferenceTheme">@style/Theme.Chromium.PreferenceTheme</item> <item name="preferenceTheme">@style/Theme.Chromium.PreferenceTheme</item>
</style> </style>
...@@ -52,14 +46,6 @@ ...@@ -52,14 +46,6 @@
<item name="android:paddingStart">16dp</item> <item name="android:paddingStart">16dp</item>
</style> </style>
<style name="PreferenceCategoryWithButtonStyle">
<item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
<item name="android:paddingEnd">4dp</item>
</style>
<style name="TextAppearance.PreferenceCategoryText" parent="TextAppearance.RobotoMediumStyle">
<item name="android:textColor">@color/pref_accent_color</item>
<item name="android:textSize">12sp</item>
</style>
<style name="PreferenceTitle"> <style name="PreferenceTitle">
<item name="android:ellipsize">end</item> <item name="android:ellipsize">end</item>
<item name="android:singleLine">true</item> <item name="android:singleLine">true</item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment