Loading packages/SystemUI/res/layout/qs_paged_page.xml +5 −1 Original line number Diff line number Diff line Loading @@ -18,4 +18,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tile_page" android:layout_width="match_parent" android:layout_height="match_parent"/> android:layout_height="match_parent" android:paddingStart="@dimen/notification_side_paddings" android:paddingEnd="@dimen/notification_side_paddings" android:clipChildren="false" android:clipToPadding="false" /> packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +16 −2 Original line number Diff line number Diff line Loading @@ -80,8 +80,22 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { @Override public void setPageMargin(int marginPixels) { if (marginPixels != getPageMargin()) { super.setPageMargin(marginPixels); // 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, // matching the margin set from QSContainerImpl (note that new pages will always be inflated // with the correct value. // 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); 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()); } } Loading packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -295,7 +295,7 @@ public class QSContainerImpl extends FrameLayout { 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); qsPanelController.setPageMargin(mSideMargins); } else if (view == mHeader) { // No content padding for the header. } else { Loading Loading
packages/SystemUI/res/layout/qs_paged_page.xml +5 −1 Original line number Diff line number Diff line Loading @@ -18,4 +18,8 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/tile_page" android:layout_width="match_parent" android:layout_height="match_parent"/> android:layout_height="match_parent" android:paddingStart="@dimen/notification_side_paddings" android:paddingEnd="@dimen/notification_side_paddings" android:clipChildren="false" android:clipToPadding="false" />
packages/SystemUI/src/com/android/systemui/qs/PagedTileLayout.java +16 −2 Original line number Diff line number Diff line Loading @@ -80,8 +80,22 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout { @Override public void setPageMargin(int marginPixels) { if (marginPixels != getPageMargin()) { super.setPageMargin(marginPixels); // 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, // matching the margin set from QSContainerImpl (note that new pages will always be inflated // with the correct value. // 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); 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()); } } Loading
packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java +1 −1 Original line number Diff line number Diff line Loading @@ -295,7 +295,7 @@ public class QSContainerImpl extends FrameLayout { 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); qsPanelController.setPageMargin(mSideMargins); } else if (view == mHeader) { // No content padding for the header. } else { Loading