Remove odd spacing after the divider

Two strategies for this UI problem

- If "PreferenceCategory" is an anchor for loading dynamical preferences,
we keep this preference category and then assign a no spacing layout to
it.

- If the cases only want to have a divider, we remove this preference category.
And then use allowDividerBelow or allowDividerAbove attribute.

Test: visual
Fixes: 130246959

Change-Id: I227fef20f5255159e4ab9a5add43a04b94e9b19a
This commit is contained in:
tmfang
2019-04-11 23:20:33 +08:00
parent 326da4b510
commit e4c5357005
4 changed files with 9 additions and 3 deletions

View File

@@ -43,6 +43,7 @@
<!-- Empty category to draw divider -->
<PreferenceCategory
android:key="recent_apps_divider"
android:layout="@layout/preference_category_no_label"
android:order="-997"/>
<!-- Notifications (appears before manage_perms), default apps (appears after) -->

View File

@@ -28,6 +28,7 @@
<PreferenceCategory
android:key="location_advanced_settings"
android:layout="@layout/preference_category_no_label"
settings:initialExpandedChildrenCount="2">
<!-- This preference category gets removed if new_recent_location_ui is disabled -->
@@ -54,7 +55,8 @@
android:selectable="true" />
<PreferenceCategory
android:key="location_services" />
android:key="location_services"
android:layout="@layout/preference_category_no_label"/>
<!-- This preference gets removed if there is no managed profile -->
<PreferenceCategory
@@ -65,5 +67,6 @@
<PreferenceCategory
android:key="location_footer"
android:layout="@layout/preference_category_no_label"
settings:allowDividerAbove="false"/>
</PreferenceScreen>

View File

@@ -64,7 +64,8 @@
<!-- Privacy Service -->
<PreferenceCategory
android:key="privacy_services"/>
android:key="privacy_services"
android:layout="@layout/preference_category_no_label"/>
<PreferenceCategory
android:key="dashboard_tile_placeholder"/>

View File

@@ -96,7 +96,8 @@
<PreferenceCategory
android:order="40"
android:key="security_settings_device_admin_category">
android:key="security_settings_device_admin_category"
android:layout="@layout/preference_category_no_label">
<Preference
android:key="manage_device_admin"