diff options
author | Jorim Jaggi <jjaggi@google.com> | 2014-08-04 23:35:47 +0200 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2014-08-05 00:07:16 +0200 |
commit | 2ae259df68659fd3c0c3ca070f58ca40b20de8b8 (patch) | |
tree | ae7eb7f92749bfdb9228e875059ce8ed0cafeaf4 /packages/SystemUI/src | |
parent | ae44128776410abd11bd06ae700db9cc4606a773 (diff) | |
download | frameworks_base-2ae259df68659fd3c0c3ca070f58ca40b20de8b8.zip frameworks_base-2ae259df68659fd3c0c3ca070f58ca40b20de8b8.tar.gz frameworks_base-2ae259df68659fd3c0c3ca070f58ca40b20de8b8.tar.bz2 |
Dismiss all layout updates.
Bug: 14826666
Change-Id: I19773d0afaf34f92d987a5292de861b5963a7d8a
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/DismissView.java | 25 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java | 30 |
2 files changed, 15 insertions, 40 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/DismissView.java b/packages/SystemUI/src/com/android/systemui/statusbar/DismissView.java index 9712ee2..f674b06 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/DismissView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/DismissView.java @@ -19,23 +19,18 @@ package com.android.systemui.statusbar; import android.content.Context; import android.util.AttributeSet; import android.view.View; -import android.view.animation.AnimationUtils; import android.view.animation.Interpolator; -import android.view.animation.PathInterpolator; -import android.widget.Button; -import android.widget.TextView; + import com.android.systemui.R; +import com.android.systemui.statusbar.phone.PhoneStatusBar; public class DismissView extends ExpandableView { - private Button mClearAllText; + private View mClearAllIcon; private boolean mIsVisible; private boolean mAnimating; private boolean mWillBeGone; - private final Interpolator mAppearInterpolator = new PathInterpolator(0f, 0.2f, 1f, 1f); - private final Interpolator mDisappearInterpolator = new PathInterpolator(0f, 0f, 0.8f, 1f); - public DismissView(Context context, AttributeSet attrs) { super(context, attrs); } @@ -43,7 +38,7 @@ public class DismissView extends ExpandableView { @Override protected void onFinishInflate() { super.onFinishInflate(); - mClearAllText = (Button) findViewById(R.id.dismiss_text); + mClearAllIcon = findViewById(R.id.dismiss_text); setInvisible(); } @@ -83,12 +78,12 @@ public class DismissView extends ExpandableView { float endValue = nowVisible ? 1.0f : 0.0f; Interpolator interpolator; if (nowVisible) { - interpolator = mAppearInterpolator; + interpolator = PhoneStatusBar.ALPHA_IN; } else { - interpolator = mDisappearInterpolator; + interpolator = PhoneStatusBar.ALPHA_OUT; } mAnimating = true; - mClearAllText.animate() + mClearAllIcon.animate() .alpha(endValue) .setInterpolator(interpolator) .setDuration(260) @@ -111,7 +106,7 @@ public class DismissView extends ExpandableView { } public void setInvisible() { - mClearAllText.setAlpha(0.0f); + mClearAllIcon.setAlpha(0.0f); mIsVisible = false; } @@ -134,7 +129,7 @@ public class DismissView extends ExpandableView { } public void setOnButtonClickListener(OnClickListener onClickListener) { - mClearAllText.setOnClickListener(onClickListener); + mClearAllIcon.setOnClickListener(onClickListener); } @Override @@ -143,7 +138,7 @@ public class DismissView extends ExpandableView { } public void cancelAnimation() { - mClearAllText.animate().cancel(); + mClearAllIcon.animate().cancel(); } public boolean willBeGone() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index 3ec2395..3c111b6 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -501,31 +501,11 @@ public abstract class PanelView extends FrameLayout { @Override public void onAnimationEnd(Animator animation) { if (clearAllExpandHack && !mCancelled) { - mHeightAnimator = createHeightAnimator(getMaxPanelHeight()); - mHeightAnimator.setInterpolator(mLinearOutSlowInInterpolator); - mHeightAnimator.setDuration(350); - mHeightAnimator.addListener(new AnimatorListenerAdapter() { - private boolean mCancelled; - - @Override - public void onAnimationCancel(Animator animation) { - mCancelled = true; - } - - @Override - public void onAnimationEnd(Animator animation) { - mHeightAnimator = null; - if (!mCancelled) { - notifyExpandingFinished(); - } - } - }); - mHeightAnimator.start(); - } else { - mHeightAnimator = null; - if (!mCancelled) { - notifyExpandingFinished(); - } + setExpandedHeightInternal(getMaxPanelHeight()); + } + mHeightAnimator = null; + if (!mCancelled) { + notifyExpandingFinished(); } } }); |