}
/**
- * Called when the panel was layouted expanded for the first time after being collapsed.
+ * Called when the size of the notification panel changes
*/
- public void onPanelExpandedAndLayouted() {
+ public void onPanelHeightChanged() {
if (mState == StatusBarState.KEYGUARD) {
// Since the number of notifications is determined based on the height of the view, we
// need to update them.
private boolean mMotionAborted;
private boolean mUpwardsWhenTresholdReached;
private boolean mAnimatingOnDown;
+ private int mLayoutHeight = 0;
private ValueAnimator mHeightAnimator;
private ObjectAnimator mPeekAnimator;
@Override
protected void onLayout (boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
+ if (mLayoutHeight != getHeight()) {
+ mLayoutHeight = getHeight();
+ mStatusBar.onPanelHeightChanged();
+ }
requestPanelHeightUpdate();
mHasLayoutedSinceDown = true;
if (mUpdateFlingOnLayout) {
if (mStatusBar.getStatusBarWindow().getHeight()
!= mStatusBar.getStatusBarHeight()) {
getViewTreeObserver().removeOnGlobalLayoutListener(this);
- mStatusBar.onPanelExpandedAndLayouted();
if (animate) {
mBar.startOpeningPanel(PanelView.this);
notifyExpandingStarted();