Merge "Remove all reference to settings_side_margin."

This commit is contained in:
TreeHugger Robot
2019-02-22 03:28:20 +00:00
committed by Android (Google) Code Review
11 changed files with 9 additions and 91 deletions

View File

@@ -2985,7 +2985,7 @@
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location
file="res/layout/user_info_header.xml"
line="95"
line="93"
column="11"/>
</issue>

View File

@@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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.
-->
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="none"
android:fillViewport="true">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
style="?android:attr/tabWidgetStyle"
android:paddingStart="@dimen/settings_side_margin"
android:paddingEnd="@dimen/settings_side_margin"
/>
</HorizontalScrollView>

View File

@@ -23,9 +23,7 @@
<FrameLayout
android:id="@+id/preview_viewport"
android:layout_width="match_parent"
android:layout_height="@dimen/captioning_preview_height"
android:paddingStart="@dimen/settings_side_margin"
android:paddingEnd="@dimen/settings_side_margin" >
android:layout_height="@dimen/captioning_preview_height" >
<ImageView
android:layout_width="match_parent"

View File

@@ -33,9 +33,7 @@
android:id="@android:id/list_container"
android:layout_height="0px"
android:layout_weight="1"
android:layout_width="match_parent"
android:paddingStart="@dimen/settings_side_margin"
android:paddingEnd="@dimen/settings_side_margin">
android:layout_width="match_parent">
<include layout="@layout/loading_container" />

View File

@@ -16,9 +16,7 @@
<TabHost
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="@dimen/settings_side_margin"
android:paddingEnd="@dimen/settings_side_margin">
android:layout_height="match_parent">
<LinearLayout
android:orientation="vertical"

View File

@@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2015 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.
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingStart="@dimen/settings_side_margin"
android:paddingEnd="@dimen/settings_side_margin">
<ListView
android:id="@+id/credential_list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:scrollbarStyle="outsideOverlay">
</ListView>
</LinearLayout>

View File

@@ -21,9 +21,7 @@
android:gravity="center_vertical"
android:orientation="vertical"
android:focusable="true"
android:clickable="true"
android:paddingStart="@dimen/settings_side_margin"
android:paddingEnd="@dimen/settings_side_margin" >
android:clickable="true" >
<LinearLayout
android:layout_width="match_parent"

View File

@@ -59,7 +59,6 @@
<dimen name="color_mode_preview_height">320dp</dimen>
<dimen name="ring_progress_bar_thickness">4dp</dimen>
<dimen name="settings_side_margin">0dip</dimen>
<!-- Weight of the left pane in a multi-pane preference layout. -->
<integer name="preferences_left_pane_weight">4</integer>

View File

@@ -69,8 +69,6 @@
</style>
<style name="PreferenceFragmentListSinglePane" parent="@*android:style/PreferenceFragmentList">
<item name="android:paddingStart">@dimen/settings_side_margin</item>
<item name="android:paddingEnd">@dimen/settings_side_margin</item>
<item name="android:layout_marginStart">0dp</item>
<item name="android:layout_marginEnd">0dp</item>
<item name="android:scrollbarStyle">outsideOverlay</item>

View File

@@ -38,7 +38,7 @@
<item name="wifi_signal_color">?android:attr/colorAccent</item>
<item name="wifi_friction">@drawable/wifi_friction</item>
<item name="side_margin">@dimen/settings_side_margin</item>
<item name="side_margin">0dp</item>
<item name="sudListItemIconColor">?android:attr/colorAccent</item>
<!-- Redefine the ActionBar style for contentInsetStart -->

View File

@@ -270,27 +270,21 @@ public final class Utils extends com.android.settingslib.Utils {
final boolean movePadding = list.getScrollBarStyle() == View.SCROLLBARS_OUTSIDE_OVERLAY;
if (movePadding) {
final Resources res = list.getResources();
final int paddingSide = res.getDimensionPixelSize(R.dimen.settings_side_margin);
final int paddingBottom = res.getDimensionPixelSize(
com.android.internal.R.dimen.preference_fragment_padding_bottom);
if (parent instanceof PreferenceFrameLayout) {
((PreferenceFrameLayout.LayoutParams) child.getLayoutParams()).removeBorders = true;
final int effectivePaddingSide = ignoreSidePadding ? 0 : paddingSide;
list.setPaddingRelative(effectivePaddingSide, 0, effectivePaddingSide, paddingBottom);
} else {
list.setPaddingRelative(paddingSide, 0, paddingSide, paddingBottom);
}
list.setPaddingRelative(0 /* start */, 0 /* top */, 0 /* end */, paddingBottom);
}
}
public static void forceCustomPadding(View view, boolean additive) {
final Resources res = view.getResources();
final int paddingSide = res.getDimensionPixelSize(R.dimen.settings_side_margin);
final int paddingStart = paddingSide + (additive ? view.getPaddingStart() : 0);
final int paddingEnd = paddingSide + (additive ? view.getPaddingEnd() : 0);
final int paddingStart = additive ? view.getPaddingStart() : 0;
final int paddingEnd = additive ? view.getPaddingEnd() : 0;
final int paddingBottom = res.getDimensionPixelSize(
com.android.internal.R.dimen.preference_fragment_padding_bottom);