Loading packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerWidget.java +11 −6 Original line number Diff line number Diff line Loading @@ -272,11 +272,6 @@ public class PowerWidget extends FrameLayout { mScrollView.setFadingEdgeLength(mContext.getResources().getDisplayMetrics().widthPixels / LAYOUT_SCROLL_BUTTON_THRESHOLD); mScrollView.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET); mScrollView.setOverScrollMode(View.OVER_SCROLL_NEVER); // set the padding on the linear layout to the size of our scrollbar, so we don't have them overlap mButtonLayout.setPadding(mButtonLayout.getPaddingLeft(), mButtonLayout.getPaddingTop(), mButtonLayout.getPaddingRight(), mScrollView.getVerticalScrollbarWidth()); mScrollView.addView(mButtonLayout, WIDGET_LAYOUT_PARAMS); updateScrollbar(); addView(mScrollView, WIDGET_LAYOUT_PARAMS); Loading Loading @@ -370,6 +365,15 @@ public class PowerWidget extends FrameLayout { boolean hideScrollBar = Settings.System.getInt(mContext.getContentResolver(), Settings.System.EXPANDED_HIDE_SCROLLBAR, 0) == 1; mScrollView.setHorizontalScrollBarEnabled(!hideScrollBar); // set the padding on the linear layout to the size of our scrollbar, // so we don't have them overlap // need to be here for make use of EXPANDED_HIDE_SCROLLBAR, expanding or collapsing // the space used by the scrollbar if (mButtonLayout != null) { mButtonLayout.setPadding(0, 0, 0, !hideScrollBar ? mScrollView.getVerticalScrollbarWidth() : 0); } } private void updateHapticFeedbackSetting() { Loading Loading @@ -486,7 +490,8 @@ public class PowerWidget extends FrameLayout { updateVisibility(); // now check for scrollbar hiding } else if(uri.equals(Settings.System.getUriFor(Settings.System.EXPANDED_HIDE_SCROLLBAR))) { updateScrollbar(); // Needed to remove scrollview to gain the space of the scrollable area recreateButtonLayout(); } if (uri.equals(Settings.System.getUriFor(Settings.System.HAPTIC_FEEDBACK_ENABLED)) Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/powerwidget/PowerWidget.java +11 −6 Original line number Diff line number Diff line Loading @@ -272,11 +272,6 @@ public class PowerWidget extends FrameLayout { mScrollView.setFadingEdgeLength(mContext.getResources().getDisplayMetrics().widthPixels / LAYOUT_SCROLL_BUTTON_THRESHOLD); mScrollView.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET); mScrollView.setOverScrollMode(View.OVER_SCROLL_NEVER); // set the padding on the linear layout to the size of our scrollbar, so we don't have them overlap mButtonLayout.setPadding(mButtonLayout.getPaddingLeft(), mButtonLayout.getPaddingTop(), mButtonLayout.getPaddingRight(), mScrollView.getVerticalScrollbarWidth()); mScrollView.addView(mButtonLayout, WIDGET_LAYOUT_PARAMS); updateScrollbar(); addView(mScrollView, WIDGET_LAYOUT_PARAMS); Loading Loading @@ -370,6 +365,15 @@ public class PowerWidget extends FrameLayout { boolean hideScrollBar = Settings.System.getInt(mContext.getContentResolver(), Settings.System.EXPANDED_HIDE_SCROLLBAR, 0) == 1; mScrollView.setHorizontalScrollBarEnabled(!hideScrollBar); // set the padding on the linear layout to the size of our scrollbar, // so we don't have them overlap // need to be here for make use of EXPANDED_HIDE_SCROLLBAR, expanding or collapsing // the space used by the scrollbar if (mButtonLayout != null) { mButtonLayout.setPadding(0, 0, 0, !hideScrollBar ? mScrollView.getVerticalScrollbarWidth() : 0); } } private void updateHapticFeedbackSetting() { Loading Loading @@ -486,7 +490,8 @@ public class PowerWidget extends FrameLayout { updateVisibility(); // now check for scrollbar hiding } else if(uri.equals(Settings.System.getUriFor(Settings.System.EXPANDED_HIDE_SCROLLBAR))) { updateScrollbar(); // Needed to remove scrollview to gain the space of the scrollable area recreateButtonLayout(); } if (uri.equals(Settings.System.getUriFor(Settings.System.HAPTIC_FEEDBACK_ENABLED)) Loading