diff options
author | John Spurlock <jspurlock@google.com> | 2014-05-28 20:27:44 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2014-05-29 08:49:41 -0400 |
commit | 2684d5e7d7f0b698c631f27b099760fae33e84ba (patch) | |
tree | cec4d0f604e9dba977e010ae24cd14c263f928d7 /packages | |
parent | 7ee26070eaa4a8b1cde8e265c7136fba7e79a172 (diff) | |
download | frameworks_base-2684d5e7d7f0b698c631f27b099760fae33e84ba.zip frameworks_base-2684d5e7d7f0b698c631f27b099760fae33e84ba.tar.gz frameworks_base-2684d5e7d7f0b698c631f27b099760fae33e84ba.tar.bz2 |
QuickSettings: Basic content-resizing for detail panel.
Also remove toggle from zen tile + fix bottom padding.
Bug:15315490
Change-Id: Ib839b9280ce60d2f51e4c0c46e41a7743e7ec8f6
Diffstat (limited to 'packages')
5 files changed, 19 insertions, 10 deletions
diff --git a/packages/SystemUI/res/layout/volume_panel.xml b/packages/SystemUI/res/layout/volume_panel.xml index bc7288d..046862f 100644 --- a/packages/SystemUI/res/layout/volume_panel.xml +++ b/packages/SystemUI/res/layout/volume_panel.xml @@ -24,6 +24,7 @@ android:id="@+id/slider_panel" android:layout_width="match_parent" android:layout_height="wrap_content" + android:minHeight="64dip" android:layout_toLeftOf="@+id/expand_button_divider" /> <ImageView diff --git a/packages/SystemUI/res/layout/zen_mode_panel.xml b/packages/SystemUI/res/layout/zen_mode_panel.xml index ae04bf5..0936cc2 100644 --- a/packages/SystemUI/res/layout/zen_mode_panel.xml +++ b/packages/SystemUI/res/layout/zen_mode_panel.xml @@ -21,7 +21,9 @@ android:layout_height="wrap_content" android:background="@color/system_primary_color" android:orientation="vertical" - android:padding="@dimen/qs_panel_padding" > + android:paddingTop="@dimen/qs_panel_padding" + android:paddingLeft="@dimen/qs_panel_padding" + android:paddingRight="@dimen/qs_panel_padding" > <TextView android:id="@android:id/title" diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java index bdac7a0..626fc0d 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java @@ -191,15 +191,23 @@ public class QSPanel extends ViewGroup { final int ch = record.row == 0 ? mLargeCellHeight : mCellHeight; record.tileView.measure(exactly(cw), exactly(ch)); } - final int actualHeight = rows == 0 ? 0 : getRowTop(rows); - mDetail.measure(exactly(width), exactly(actualHeight)); - setMeasuredDimension(width, actualHeight); + int h = rows == 0 ? 0 : getRowTop(rows); + mDetail.measure(exactly(width), unspecified()); + if (mDetail.getVisibility() == VISIBLE && mDetail.getChildCount() > 0) { + final int dmh = mDetail.getMeasuredHeight(); + if (dmh > 0) h = dmh; + } + setMeasuredDimension(width, h); } private static int exactly(int size) { return MeasureSpec.makeMeasureSpec(size, MeasureSpec.EXACTLY); } + private static int unspecified() { + return MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED); + } + @Override protected void onLayout(boolean changed, int l, int t, int r, int b) { final int w = getWidth(); diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NotificationsTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NotificationsTile.java index 267786b..20bbf8b 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NotificationsTile.java +++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NotificationsTile.java @@ -108,11 +108,7 @@ public class NotificationsTile extends QSTile<NotificationsTile.NotificationsSta @Override protected void handleClick() { - if (mState.zen) { - mZenController.setZen(false); - } else { - showDetail(true); - } + showDetail(true); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java index 0c27ab0..802e5e5 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java @@ -164,7 +164,9 @@ public class NotificationPanelView extends PanelView implements // Calculate quick setting heights. mQsMinExpansionHeight = mHeader.getCollapsedHeight() + mQsPeekHeight; mQsMaxExpansionHeight = mHeader.getExpandedHeight() + mQsContainer.getHeight(); - if (!mQsExpanded) { + if (mQsExpanded) { + setQsStackScrollerPadding(mQsMaxExpansionHeight); + } else { setQsExpansion(mQsMinExpansionHeight); positionClockAndNotifications(); mNotificationStackScroller.setStackHeight(getExpandedHeight()); |