Merge "Fix the category preference aligement problem" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-01-28 08:25:22 +00:00
committed by Android (Google) Code Review
3 changed files with 29 additions and 4 deletions

View File

@@ -19,14 +19,13 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="24dp"
android:paddingStart="24dp"
android:paddingRight="?android:attr/listPreferredItemPaddingRight"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:background="?android:attr/selectableItemBackground"
android:baselineAligned="false"
android:layout_marginTop="16dp"
android:gravity="center_vertical">
android:gravity="center_vertical"
style="@style/PreferenceCategoryStartMargin">
<RelativeLayout
android:layout_width="0dp"
@@ -57,6 +56,5 @@
android:textColor="?android:attr/textColorSecondary"
android:maxLines="10"
style="@style/PreferenceSummaryTextStyle"/>
</RelativeLayout>
</LinearLayout>

View 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>
<style name="PreferenceCategoryStartMargin">
<item name="android:paddingLeft">24dp</item>
<item name="android:paddingStart">24dp</item>
</style>
</resources>

View File

@@ -22,4 +22,9 @@
<!-- 0.8 Spacing, 0.8/11 = 0.072727273 -->
<item name="android:letterSpacing">0.072727273</item>
</style>
<style name="PreferenceCategoryStartMargin">
<item name="android:paddingLeft">?android:attr/listPreferredItemPaddingLeft</item>
<item name="android:paddingStart">?android:attr/listPreferredItemPaddingStart</item>
</style>
</resources>