summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jason Monk <jmonk@google.com> 2016-03-31 15:43:45 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-03-31 15:43:46 +0000
commit33b30609ff916a1a9476fdecbf60c19cff56f76c (patch)
treeff56f804f7da0eae213b22f8fbb7ef9cb6d4a823
parent26350a42762c415e772303a2440d8317523f224d (diff)
parent428914d0f07f4a0d5b55c4de7ec30708505bd21f (diff)
Merge "Remove panel paddings/margins when QS is customizing" into nyc-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationsQuickSettingsContainer.java26
2 files changed, 27 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
index 83ac45c5c8c6..ad8b4efb2993 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizer.java
@@ -125,6 +125,7 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
mClipper.animateCircularClip(x, y, true, mExpandAnimationListener);
new TileQueryHelper(mContext, mHost).setListener(mTileAdapter);
mNotifQsContainer.setCustomizerAnimating(true);
+ mNotifQsContainer.setCustomizerShowing(true);
}
}
@@ -137,6 +138,7 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
save();
mClipper.animateCircularClip(x, y, false, mCollapseAnimationListener);
mNotifQsContainer.setCustomizerAnimating(true);
+ mNotifQsContainer.setCustomizerShowing(false);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationsQuickSettingsContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationsQuickSettingsContainer.java
index 960515b9137a..35fb2a50306e 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationsQuickSettingsContainer.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationsQuickSettingsContainer.java
@@ -35,6 +35,7 @@ import com.android.systemui.qs.customize.QSCustomizer;
public class NotificationsQuickSettingsContainer extends FrameLayout
implements ViewStub.OnInflateListener, DensityContainer.InflateListener {
+
private DensityContainer mQsContainer;
private View mUserSwitcher;
private View mStackScroller;
@@ -43,6 +44,9 @@ public class NotificationsQuickSettingsContainer extends FrameLayout
private boolean mQsExpanded;
private boolean mCustomizerAnimating;
+ private int mBottomPadding;
+ private int mStackScrollerMargin;
+
public NotificationsQuickSettingsContainer(Context context, AttributeSet attrs) {
super(context, attrs);
}
@@ -53,6 +57,7 @@ public class NotificationsQuickSettingsContainer extends FrameLayout
mQsContainer = (DensityContainer) findViewById(R.id.qs_density_container);
mQsContainer.addInflateListener(this);
mStackScroller = findViewById(R.id.notification_stack_scroller);
+ mStackScrollerMargin = ((LayoutParams) mStackScroller.getLayoutParams()).bottomMargin;
mKeyguardStatusBar = findViewById(R.id.keyguard_header);
ViewStub userSwitcher = (ViewStub) findViewById(R.id.keyguard_user_switcher);
userSwitcher.setOnInflateListener(this);
@@ -75,7 +80,8 @@ public class NotificationsQuickSettingsContainer extends FrameLayout
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
- setPadding(0, 0, 0, insets.getStableInsetBottom());
+ mBottomPadding = insets.getStableInsetBottom();
+ setPadding(0, 0, 0, mBottomPadding);
return insets;
}
@@ -141,4 +147,22 @@ public class NotificationsQuickSettingsContainer extends FrameLayout
invalidate();
}
}
+
+ public void setCustomizerShowing(boolean isShowing) {
+ if (isShowing) {
+ // Clear out bottom paddings/margins so the qs customization can be full height.
+ setPadding(0, 0, 0, 0);
+ setBottomMargin(mStackScroller, 0);
+ } else {
+ setPadding(0, 0, 0, mBottomPadding);
+ setBottomMargin(mStackScroller, mStackScrollerMargin);
+ }
+
+ }
+
+ private void setBottomMargin(View v, int bottomMargin) {
+ LayoutParams params = (LayoutParams) v.getLayoutParams();
+ params.bottomMargin = bottomMargin;
+ v.setLayoutParams(params);
+ }
}