Loading packages/SystemUI/res/layout/qs_paged_tile_layout.xml +2 −1 Original line number Diff line number Diff line Loading @@ -21,5 +21,6 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:clipChildren="true" android:clipChildren="false" android:clipToPadding="false" android:paddingBottom="@dimen/qs_paged_tile_layout_padding_bottom" /> packages/SystemUI/res/layout/qs_panel.xml +5 −1 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ android:elevation="4dp" android:importantForAccessibility="no" android:scrollbars="none" android:clipChildren="false" android:clipToPadding="false" android:layout_weight="1"> <com.android.systemui.qs.QSPanel android:id="@+id/quick_settings_panel" Loading @@ -43,7 +45,9 @@ android:layout_height="wrap_content" android:background="@android:color/transparent" android:focusable="true" android:accessibilityTraversalBefore="@android:id/edit"> android:accessibilityTraversalBefore="@android:id/edit" android:clipToPadding="false" android:clipChildren="false"> <include layout="@layout/qs_footer_impl" /> <include layout="@layout/qs_media_divider" android:id="@+id/divider"/> Loading packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +7 −15 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ import android.animation.PropertyValuesHolder; import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Rect; import android.os.Bundle; import android.util.AttributeSet; import android.util.Log; Loading Loading @@ -63,7 +62,6 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { private int mPageToRestore = -1; private int mLayoutOrientation; private int mLayoutDirection; private final Rect mClippingRect; private final UiEventLogger mUiEventLogger = QSEvents.INSTANCE.getQsUiEventsLogger(); private int mExcessHeight; private int mLastExcessHeight; Loading @@ -78,14 +76,16 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { setCurrentItem(0, false); mLayoutOrientation = getResources().getConfiguration().orientation; mLayoutDirection = getLayoutDirection(); mClippingRect = new Rect(); // Make sure there's a space between pages when scroling setPageMargin(context.getResources().getDimensionPixelOffset( R.dimen.qs_tile_margin_horizontal)); } private int mLastMaxHeight = -1; @Override public void setPageMargin(int marginPixels) { if (marginPixels != getPageMargin()) { super.setPageMargin(marginPixels); } } public void saveInstanceState(Bundle outState) { outState.putInt(CURRENT_PAGE, getCurrentItem()); } Loading Loading @@ -352,14 +352,6 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { return changed; } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); // Clip to margins mClippingRect.set(0, 0, (r - l), b - t); setClipBounds(mClippingRect); } @Override public boolean setMinRows(int minRows) { mMinRows = minRows; Loading packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +3 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,9 @@ public class QSContainerImpl extends FrameLayout { if (view == mQSPanelContainer) { // QS panel lays out some of its content full width qsPanelController.setContentMargins(mContentPadding, mContentPadding); // Set it as double the side margin (to simulate end margin of current page + // start margin of next page). qsPanelController.setPageMargin(2 * mSideMargins); } else if (view == mHeader) { // The header contains the QQS panel which needs to have special padding, to // visually align them. Loading packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +6 −2 Original line number Diff line number Diff line Loading @@ -480,8 +480,12 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca private void updateQsBounds() { if (mLastQSExpansion == 1.0f) { // Fully expanded, let's set the layout bounds as clip bounds. This is necessary because // it's a scrollview and otherwise wouldn't be clipped. mQsBounds.set(0, 0, mQSPanelScrollView.getWidth(), mQSPanelScrollView.getHeight()); // it's a scrollview and otherwise wouldn't be clipped. However, we set the horizontal // bounds so the pages go to the ends of QSContainerImpl ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) mQSPanelScrollView.getLayoutParams(); mQsBounds.set(-lp.leftMargin, 0, mQSPanelScrollView.getWidth() + lp.rightMargin, mQSPanelScrollView.getHeight()); } mQSPanelScrollView.setClipBounds(mQsBounds); } Loading Loading
packages/SystemUI/res/layout/qs_paged_tile_layout.xml +2 −1 Original line number Diff line number Diff line Loading @@ -21,5 +21,6 @@ android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:clipChildren="true" android:clipChildren="false" android:clipToPadding="false" android:paddingBottom="@dimen/qs_paged_tile_layout_padding_bottom" />
packages/SystemUI/res/layout/qs_panel.xml +5 −1 Original line number Diff line number Diff line Loading @@ -36,6 +36,8 @@ android:elevation="4dp" android:importantForAccessibility="no" android:scrollbars="none" android:clipChildren="false" android:clipToPadding="false" android:layout_weight="1"> <com.android.systemui.qs.QSPanel android:id="@+id/quick_settings_panel" Loading @@ -43,7 +45,9 @@ android:layout_height="wrap_content" android:background="@android:color/transparent" android:focusable="true" android:accessibilityTraversalBefore="@android:id/edit"> android:accessibilityTraversalBefore="@android:id/edit" android:clipToPadding="false" android:clipChildren="false"> <include layout="@layout/qs_footer_impl" /> <include layout="@layout/qs_media_divider" android:id="@+id/divider"/> Loading
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +7 −15 Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ import android.animation.PropertyValuesHolder; import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Rect; import android.os.Bundle; import android.util.AttributeSet; import android.util.Log; Loading Loading @@ -63,7 +62,6 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { private int mPageToRestore = -1; private int mLayoutOrientation; private int mLayoutDirection; private final Rect mClippingRect; private final UiEventLogger mUiEventLogger = QSEvents.INSTANCE.getQsUiEventsLogger(); private int mExcessHeight; private int mLastExcessHeight; Loading @@ -78,14 +76,16 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { setCurrentItem(0, false); mLayoutOrientation = getResources().getConfiguration().orientation; mLayoutDirection = getLayoutDirection(); mClippingRect = new Rect(); // Make sure there's a space between pages when scroling setPageMargin(context.getResources().getDimensionPixelOffset( R.dimen.qs_tile_margin_horizontal)); } private int mLastMaxHeight = -1; @Override public void setPageMargin(int marginPixels) { if (marginPixels != getPageMargin()) { super.setPageMargin(marginPixels); } } public void saveInstanceState(Bundle outState) { outState.putInt(CURRENT_PAGE, getCurrentItem()); } Loading Loading @@ -352,14 +352,6 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { return changed; } @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { super.onLayout(changed, l, t, r, b); // Clip to margins mClippingRect.set(0, 0, (r - l), b - t); setClipBounds(mClippingRect); } @Override public boolean setMinRows(int minRows) { mMinRows = minRows; Loading
packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +3 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,9 @@ public class QSContainerImpl extends FrameLayout { if (view == mQSPanelContainer) { // QS panel lays out some of its content full width qsPanelController.setContentMargins(mContentPadding, mContentPadding); // Set it as double the side margin (to simulate end margin of current page + // start margin of next page). qsPanelController.setPageMargin(2 * mSideMargins); } else if (view == mHeader) { // The header contains the QQS panel which needs to have special padding, to // visually align them. Loading
packages/SystemUI/src/com/android/systemui/qs/QSFragment.java +6 −2 Original line number Diff line number Diff line Loading @@ -480,8 +480,12 @@ public class QSFragment extends LifecycleFragment implements QS, CommandQueue.Ca private void updateQsBounds() { if (mLastQSExpansion == 1.0f) { // Fully expanded, let's set the layout bounds as clip bounds. This is necessary because // it's a scrollview and otherwise wouldn't be clipped. mQsBounds.set(0, 0, mQSPanelScrollView.getWidth(), mQSPanelScrollView.getHeight()); // it's a scrollview and otherwise wouldn't be clipped. However, we set the horizontal // bounds so the pages go to the ends of QSContainerImpl ViewGroup.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) mQSPanelScrollView.getLayoutParams(); mQsBounds.set(-lp.leftMargin, 0, mQSPanelScrollView.getWidth() + lp.rightMargin, mQSPanelScrollView.getHeight()); } mQSPanelScrollView.setClipBounds(mQsBounds); } Loading