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
This commit is contained in:
@@ -419,13 +419,20 @@ public class Utils {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user