Loading packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +9 −5 Original line number Diff line number Diff line Loading @@ -103,8 +103,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { } private int mLastMaxHeight = -1; @Override public void setPageMargin(int marginPixels) { public void setPageMargin(int marginPixelsStart, int marginPixelsEnd) { // Using page margins creates some rounding issues that interfere with the correct position // in the onPageChangedListener and therefore present bad positions to the PageIndicator. // Instead, we use negative margins in the container and positive padding in the pages, Loading @@ -113,14 +112,19 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { // QSContainerImpl resources are set onAttachedView, so this view will always have the right // values when attached. MarginLayoutParams lp = (MarginLayoutParams) getLayoutParams(); lp.setMarginStart(-marginPixels); lp.setMarginEnd(-marginPixels); lp.setMarginStart(-marginPixelsStart); lp.setMarginEnd(-marginPixelsEnd); setLayoutParams(lp); int nPages = mPages.size(); for (int i = 0; i < nPages; i++) { View v = mPages.get(i); v.setPadding(marginPixels, v.getPaddingTop(), marginPixels, v.getPaddingBottom()); v.setPadding( marginPixelsStart, v.getPaddingTop(), marginPixelsEnd, v.getPaddingBottom() ); } } Loading packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +14 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import androidx.annotation.Nullable; import com.android.systemui.Dumpable; import com.android.systemui.qs.customize.QSCustomizer; import com.android.systemui.res.R; import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.shade.LargeScreenHeaderHelper; import com.android.systemui.shade.TouchLogger; import com.android.systemui.util.LargeScreenUtils; Loading Loading @@ -300,7 +301,7 @@ public class QSContainerImpl extends FrameLayout implements Dumpable { // QS panel lays out some of its content full width qsPanelController.setContentMargins(mContentHorizontalPadding, mContentHorizontalPadding); qsPanelController.setPageMargin(mTilesPageMargin); setPageMargins(qsPanelController); } else if (view == mHeader) { quickStatusBarHeaderController.setContentMargins(mContentHorizontalPadding, mContentHorizontalPadding); Loading @@ -318,6 +319,18 @@ public class QSContainerImpl extends FrameLayout implements Dumpable { } } private void setPageMargins(QSPanelController qsPanelController) { if (SceneContainerFlag.isEnabled()) { if (mHorizontalMargins == mTilesPageMargin * 2 + 1) { qsPanelController.setPageMargin(mTilesPageMargin, mTilesPageMargin + 1); } else { qsPanelController.setPageMargin(mTilesPageMargin, mTilesPageMargin); } } else { qsPanelController.setPageMargin(mTilesPageMargin, mTilesPageMargin); } } /** * Clip QS bottom using a concave shape. */ Loading packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +2 −2 Original line number Diff line number Diff line Loading @@ -638,9 +638,9 @@ public class QSPanel extends LinearLayout implements Tunable { return mListening; } protected void setPageMargin(int pageMargin) { protected void setPageMargin(int pageMarginStart, int pageMarginEnd) { if (mTileLayout instanceof PagedTileLayout) { ((PagedTileLayout) mTileLayout).setPageMargin(pageMargin); ((PagedTileLayout) mTileLayout).setPageMargin(pageMarginStart, pageMarginEnd); } } Loading packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java +2 −2 Original line number Diff line number Diff line Loading @@ -284,8 +284,8 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> { return mView.isExpanded(); } void setPageMargin(int pageMargin) { mView.setPageMargin(pageMargin); void setPageMargin(int pageMarginStart, int pageMarginEnd) { mView.setPageMargin(pageMarginStart, pageMarginEnd); } /** Loading Loading
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +9 −5 Original line number Diff line number Diff line Loading @@ -103,8 +103,7 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { } private int mLastMaxHeight = -1; @Override public void setPageMargin(int marginPixels) { public void setPageMargin(int marginPixelsStart, int marginPixelsEnd) { // Using page margins creates some rounding issues that interfere with the correct position // in the onPageChangedListener and therefore present bad positions to the PageIndicator. // Instead, we use negative margins in the container and positive padding in the pages, Loading @@ -113,14 +112,19 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { // QSContainerImpl resources are set onAttachedView, so this view will always have the right // values when attached. MarginLayoutParams lp = (MarginLayoutParams) getLayoutParams(); lp.setMarginStart(-marginPixels); lp.setMarginEnd(-marginPixels); lp.setMarginStart(-marginPixelsStart); lp.setMarginEnd(-marginPixelsEnd); setLayoutParams(lp); int nPages = mPages.size(); for (int i = 0; i < nPages; i++) { View v = mPages.get(i); v.setPadding(marginPixels, v.getPaddingTop(), marginPixels, v.getPaddingBottom()); v.setPadding( marginPixelsStart, v.getPaddingTop(), marginPixelsEnd, v.getPaddingBottom() ); } } Loading
packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +14 −1 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ import androidx.annotation.Nullable; import com.android.systemui.Dumpable; import com.android.systemui.qs.customize.QSCustomizer; import com.android.systemui.res.R; import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.shade.LargeScreenHeaderHelper; import com.android.systemui.shade.TouchLogger; import com.android.systemui.util.LargeScreenUtils; Loading Loading @@ -300,7 +301,7 @@ public class QSContainerImpl extends FrameLayout implements Dumpable { // QS panel lays out some of its content full width qsPanelController.setContentMargins(mContentHorizontalPadding, mContentHorizontalPadding); qsPanelController.setPageMargin(mTilesPageMargin); setPageMargins(qsPanelController); } else if (view == mHeader) { quickStatusBarHeaderController.setContentMargins(mContentHorizontalPadding, mContentHorizontalPadding); Loading @@ -318,6 +319,18 @@ public class QSContainerImpl extends FrameLayout implements Dumpable { } } private void setPageMargins(QSPanelController qsPanelController) { if (SceneContainerFlag.isEnabled()) { if (mHorizontalMargins == mTilesPageMargin * 2 + 1) { qsPanelController.setPageMargin(mTilesPageMargin, mTilesPageMargin + 1); } else { qsPanelController.setPageMargin(mTilesPageMargin, mTilesPageMargin); } } else { qsPanelController.setPageMargin(mTilesPageMargin, mTilesPageMargin); } } /** * Clip QS bottom using a concave shape. */ Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +2 −2 Original line number Diff line number Diff line Loading @@ -638,9 +638,9 @@ public class QSPanel extends LinearLayout implements Tunable { return mListening; } protected void setPageMargin(int pageMargin) { protected void setPageMargin(int pageMarginStart, int pageMarginEnd) { if (mTileLayout instanceof PagedTileLayout) { ((PagedTileLayout) mTileLayout).setPageMargin(pageMargin); ((PagedTileLayout) mTileLayout).setPageMargin(pageMarginStart, pageMarginEnd); } } Loading
packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java +2 −2 Original line number Diff line number Diff line Loading @@ -284,8 +284,8 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> { return mView.isExpanded(); } void setPageMargin(int pageMargin) { mView.setPageMargin(pageMargin); void setPageMargin(int pageMarginStart, int pageMarginEnd) { mView.setPageMargin(pageMarginStart, pageMarginEnd); } /** Loading