Commit f41725bb authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

[KitKat Cleanup] Settings resources in //components

Now that KitKat (v19) is deprecated, merge settings-related style
resources under //components/browser_ui/settings from v21/styles.xml
into the base styles.xml.

Bug: 1009058, 971791
Change-Id: Iaa7adad93141fb970157c0b9fdc3a07f01895936
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2176515
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Reviewed-by: default avatarBrandon Wylie <wylieb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#765369}
parent fbf13379
......@@ -59,9 +59,6 @@ android_resources("java_resources") {
"java/res/layout/preference_spinner.xml",
"java/res/layout/preference_spinner_single_line.xml",
"java/res/layout/preference_spinner_single_line_item.xml",
"java/res/values-sw720dp-v17/styles.xml",
"java/res/values-sw720dp-v21/styles.xml",
"java/res/values-v21/styles.xml",
"java/res/values/attrs.xml",
"java/res/values/dimens.xml",
"java/res/values/styles.xml",
......
<?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. -->
<resources>
<!-- Preferences -->
<style name="PreferenceLayout" parent="PreferenceLayoutBase">
<!-- paddingStart = internal framework value of preference_icon_minWidth +
preference_item_padding_side -->
<item name="android:paddingStart">64dp</item>
</style>
</resources>
<?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. -->
<resources>
<!-- Preferences -->
<style name="PreferenceLayout" parent="PreferenceLayoutBase" />
</resources>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2019 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. -->
<resources>
<style name="PreferenceLayoutCompat">
<item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
<item name="android:paddingEnd">?android:attr/listPreferredItemPaddingEnd</item>
<item name="android:minHeight">?android:attr/listPreferredItemHeightSmall</item>
</style>
<style name="PreferenceDescriptionCompat">
<item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">16dp</item>
</style>
<style name="PreferenceWidgetCompat">
<item name="android:paddingStart">16dp</item>
</style>
<!-- TODO(crbug.com/1077340): Verify if these text styles are up to date with UX. -->
<style name="PreferenceTitle">
<item name="android:ellipsize">end</item>
<item name="android:singleLine">true</item>
<item name="android:textAppearance">?android:attr/textAppearanceListItem</item>
</style>
<style name="PreferenceSummary">
<item name="android:textAppearance">@style/TextAppearance.TextMedium.Secondary</item>
</style>
<style name="PreferenceLayoutBase">
<item name="android:background">?android:attr/activatedBackgroundIndicator</item>
<item name="android:minHeight">?android:attr/listPreferredItemHeightSmall</item>
<item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">16dp</item>
<item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
<item name="android:paddingEnd">?android:attr/listPreferredItemPaddingEnd</item>
</style>
<style name="PreferenceLayout" parent="PreferenceLayoutBase" />
</resources>
......@@ -3,53 +3,48 @@
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<resources>
<!-- TODO(crbug.com/971791): The asymmetric start and end paddings here preserve the same
overall padding as the pre-support library custom preference layout. Following migration to
the support library preferences, we should investigate simplifying these styles.-->
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="PreferenceLayoutCompat">
<item name="android:paddingStart">8dp</item>
<item name="android:paddingEnd">10dp</item>
<item name="android:minHeight">?android:attr/listPreferredItemHeight</item>
<item name="android:background">?android:attr/selectableItemBackground</item>
<item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
<item name="android:paddingEnd">?android:attr/listPreferredItemPaddingEnd</item>
<item name="android:minHeight">?android:attr/listPreferredItemHeightSmall</item>
</style>
<style name="PreferenceDescriptionCompat">
<item name="android:paddingTop">6dp</item>
<item name="android:paddingBottom">6dp</item>
<item name="android:paddingEnd">8dp</item>
<item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">16dp</item>
</style>
<style name="PreferenceWidgetCompat">
<item name="android:minWidth">48dp</item>
<item name="android:paddingStart">16dp</item>
</style>
<!-- TODO(crbug.com/1077340): Verify if these text styles are up to date with UX. -->
<style name="PreferenceTitle">
<item name="android:ellipsize">end</item>
<item name="android:singleLine">true</item>
<item name="android:textAppearance">@style/TextAppearance.PreferenceMediumText</item>
<item name="android:textAppearance">?android:attr/textAppearanceListItem</item>
</style>
<style name="PreferenceSummary">
<item name="android:textAppearance">@style/TextAppearance.TextMedium.Secondary</item>
</style>
<style name="TextAppearance.PreferenceMediumText">
<!-- TODO(crbug.com/1077375): Consider removing this text style. -->
<style name="TextAppearance.PreferenceMediumText" tools:ignore="UnusedResources">
<item name="android:textSize">18sp</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
</style>
<style name="PreferenceLayoutBase">
<style name="PreferenceLayout">
<item name="android:background">?android:attr/activatedBackgroundIndicator</item>
<item name="android:minHeight">?android:attr/listPreferredItemHeight</item>
<item name="android:paddingTop">6dp</item>
<item name="android:paddingBottom">6dp</item>
<item name="android:paddingStart">8dp</item>
<item name="android:paddingEnd">8dp</item>
<item name="android:minHeight">?android:attr/listPreferredItemHeightSmall</item>
<item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">16dp</item>
<item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
<item name="android:paddingEnd">?android:attr/listPreferredItemPaddingEnd</item>
</style>
<style name="PreferenceLayout" parent="PreferenceLayoutBase" />
<style name="PreferenceSpinnerUnderlineView">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</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