summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/layout/qs_paged_page.xml2
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/QSPanel.java11
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/TileLayout.java4
4 files changed, 19 insertions, 6 deletions
diff --git a/packages/SystemUI/res/layout/qs_paged_page.xml b/packages/SystemUI/res/layout/qs_paged_page.xml
index a246e0dffdd9..25b1a2b79a1c 100644
--- a/packages/SystemUI/res/layout/qs_paged_page.xml
+++ b/packages/SystemUI/res/layout/qs_paged_page.xml
@@ -20,5 +20,7 @@
android:id="@+id/tile_page"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/notification_side_paddings"
+ android:paddingRight="@dimen/notification_side_paddings"
android:clipChildren="false"
android:clipToPadding="false" />
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
index a9455f23e29d..1c98ef01976a 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImpl.java
@@ -38,10 +38,10 @@ public class QSContainerImpl extends FrameLayout {
private final Point mSizePoint = new Point();
private int mHeightOverride = -1;
- protected View mQSPanel;
+ private QSPanel mQSPanel;
private View mQSDetail;
- protected View mHeader;
- protected float mQsExpansion;
+ private View mHeader;
+ private float mQsExpansion;
private QSCustomizer mQSCustomizer;
private View mQSFooter;
@@ -188,7 +188,7 @@ public class QSContainerImpl extends FrameLayout {
setMargins(mQSDetail);
setMargins(mBackground);
setMargins(mQSFooter);
- setMargins(mQSPanel);
+ mQSPanel.setMargins(mSideMargins);
setMargins(mHeader);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 6368a6b32787..3e1eed5b6efa 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -578,6 +578,17 @@ public class QSPanel extends LinearLayout implements Tunable, Callback, Brightne
mFooter.showDeviceMonitoringDialog();
}
+ public void setMargins(int sideMargins) {
+ for (int i = 0; i < getChildCount(); i++) {
+ View view = getChildAt(i);
+ if (view != mTileLayout) {
+ LayoutParams lp = (LayoutParams) view.getLayoutParams();
+ lp.leftMargin = sideMargins;
+ lp.rightMargin = sideMargins;
+ }
+ }
+ }
+
private class H extends Handler {
private static final int SHOW_DETAIL = 1;
private static final int SET_TILE_VISIBILITY = 2;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
index 64e7a6353485..6d46e857c8b4 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/TileLayout.java
@@ -93,7 +93,7 @@ public class TileLayout extends ViewGroup implements QSTileLayout {
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
final int numTiles = mRecords.size();
- final int width = MeasureSpec.getSize(widthMeasureSpec);
+ final int width = MeasureSpec.getSize(widthMeasureSpec) - mPaddingLeft - mPaddingRight;
final int numRows = (numTiles + mColumns - 1) / mColumns;
mCellWidth = (width - mSidePadding * 2 - (mCellMarginHorizontal * mColumns)) / mColumns;
@@ -159,6 +159,6 @@ public class TileLayout extends ViewGroup implements QSTileLayout {
}
private int getColumnStart(int column) {
- return column * (mCellWidth + mCellMarginHorizontal) + mCellMarginHorizontal;
+ return column * (mCellWidth + mCellMarginHorizontal) + mCellMarginHorizontal + mPaddingLeft;
}
}