[DO NOT MERGE]Fix the inconsistent alignment of the main switch preference.

Replace the margin of the widget with the padding.

Bug: 232494666
Test: manual test
Change-Id: Ia09ef5f298017c810beaedda3fa21ada89f23e42
This commit is contained in:
Peter_Liang
2022-07-17 15:15:05 +08:00
committed by PETER LIANG
parent 91066c7d3c
commit 0e8aff720e

View File

@@ -20,6 +20,11 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:background="?android:attr/colorBackground"
android:minHeight="?android:attr/listPreferredItemHeight"
android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
android:paddingStart="?android:attr/listPreferredItemPaddingStart"
android:paddingTop="@dimen/settingslib_switchbar_margin"
android:paddingBottom="@dimen/settingslib_switchbar_margin"
android:orientation="vertical">
<LinearLayout
@@ -27,7 +32,6 @@
android:minHeight="@dimen/settingslib_min_switch_bar_height"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_margin="@dimen/settingslib_switchbar_margin"
android:paddingStart="@dimen/settingslib_switchbar_padding_left"
android:paddingEnd="@dimen/settingslib_switchbar_padding_right">