Push scrollbars to screen edges.
Push scrollbar to screen edges on custom ListView and ScrollViews to
match Preferences framework behavior.
Bug: 7633165
Change-Id: Ideecd0e243c7de7bf977caef2b1585e707a00ca4
diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 2ce77b5..e6d63bd 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -419,13 +419,20 @@
return statusString;
}
+ public static void forcePrepareCustomPreferencesList(
+ ViewGroup parent, View child, ListView list, boolean ignoreSidePadding) {
+ list.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
+ list.setClipToPadding(false);
+ prepareCustomPreferencesList(parent, child, list, ignoreSidePadding);
+ }
+
/**
* Prepare a custom preferences layout, moving padding to {@link ListView}
* when outside scrollbars are requested. Usually used to display
* {@link ListView} and {@link TabWidget} with correct padding.
*/
public static void prepareCustomPreferencesList(
- ViewGroup parent, View child, ListView list, boolean ignoreSidePadding) {
+ ViewGroup parent, View child, View list, boolean ignoreSidePadding) {
final boolean movePadding = list.getScrollBarStyle() == View.SCROLLBARS_OUTSIDE_OVERLAY;
if (movePadding && parent instanceof PreferenceFrameLayout) {
((PreferenceFrameLayout.LayoutParams) child.getLayoutParams()).removeBorders = true;