From e4c5357005482b95448867967ba351f46ce2d0d5 Mon Sep 17 00:00:00 2001 From: tmfang Date: Thu, 11 Apr 2019 23:20:33 +0800 Subject: [PATCH] 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 --- res/xml/app_and_notification.xml | 1 + res/xml/location_settings.xml | 5 ++++- res/xml/privacy_dashboard_settings.xml | 3 ++- res/xml/security_dashboard_settings.xml | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/res/xml/app_and_notification.xml b/res/xml/app_and_notification.xml index cdeb35eb0e0..5368f332504 100644 --- a/res/xml/app_and_notification.xml +++ b/res/xml/app_and_notification.xml @@ -43,6 +43,7 @@ diff --git a/res/xml/location_settings.xml b/res/xml/location_settings.xml index 2f43ce8cd88..9ab80a741cd 100644 --- a/res/xml/location_settings.xml +++ b/res/xml/location_settings.xml @@ -28,6 +28,7 @@ @@ -54,7 +55,8 @@ android:selectable="true" /> + android:key="location_services" + android:layout="@layout/preference_category_no_label"/> diff --git a/res/xml/privacy_dashboard_settings.xml b/res/xml/privacy_dashboard_settings.xml index 45b9d1955e3..aa789b90424 100644 --- a/res/xml/privacy_dashboard_settings.xml +++ b/res/xml/privacy_dashboard_settings.xml @@ -64,7 +64,8 @@ + android:key="privacy_services" + android:layout="@layout/preference_category_no_label"/> diff --git a/res/xml/security_dashboard_settings.xml b/res/xml/security_dashboard_settings.xml index 9fe3d5b2d22..6a896ced42c 100644 --- a/res/xml/security_dashboard_settings.xml +++ b/res/xml/security_dashboard_settings.xml @@ -96,7 +96,8 @@ + android:key="security_settings_device_admin_category" + android:layout="@layout/preference_category_no_label">