summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2014-10-31 19:10:52 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-31 19:10:53 +0000
commitb9144cea5184c90534db75b47e3818a688e64d5b (patch)
tree39f2ff09f289f18d85abca29a4ff3d54e02ddf20 /packages
parent404658eee9ec7c84dc070b018d7fcfa94bb8f83f (diff)
parent310df3127aace5a82cdc107fdb1e2d6957f38bcc (diff)
downloadframeworks_base-b9144cea5184c90534db75b47e3818a688e64d5b.zip
frameworks_base-b9144cea5184c90534db75b47e3818a688e64d5b.tar.gz
frameworks_base-b9144cea5184c90534db75b47e3818a688e64d5b.tar.bz2
Merge "Clear the initialized flag when resetting the height." into lmp-mr1-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java9
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java2
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java7
4 files changed, 13 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
index e4faa6a..02b9378 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ActivatableNotificationView.java
@@ -508,7 +508,7 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
if (mAppearAnimator != null) {
mAppearAnimator.cancel();
}
- mAnimationTranslationY = translationDirection * mActualHeight;
+ mAnimationTranslationY = translationDirection * getActualHeight();
if (mAppearAnimationFraction == -1.0f) {
// not initialized yet, we start anew
if (isAppearing) {
@@ -601,14 +601,15 @@ public abstract class ActivatableNotificationView extends ExpandableOutlineView
float top;
float bottom;
+ final int actualHeight = getActualHeight();
if (mAnimationTranslationY > 0.0f) {
- bottom = mActualHeight - heightFraction * mAnimationTranslationY * 0.1f
+ bottom = actualHeight - heightFraction * mAnimationTranslationY * 0.1f
- translateYTotalAmount;
top = bottom * heightFraction;
} else {
- top = heightFraction * (mActualHeight + mAnimationTranslationY) * 0.1f -
+ top = heightFraction * (actualHeight + mAnimationTranslationY) * 0.1f -
translateYTotalAmount;
- bottom = mActualHeight * (1 - heightFraction) + top * heightFraction;
+ bottom = actualHeight * (1 - heightFraction) + top * heightFraction;
}
mAppearAnimationRect.set(left, top, right, bottom);
setOutlineRect(left, top + mAppearAnimationTranslation, right,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 62dfeeb..a4e5e74 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -154,9 +154,9 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
}
public void resetHeight() {
+ super.resetHeight();
mMaxExpandHeight = 0;
mWasReset = true;
- mActualHeight = 0;
onHeightReset();
requestLayout();
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java
index f85d32b..a18fff2 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableOutlineView.java
@@ -41,7 +41,7 @@ public abstract class ExpandableOutlineView extends ExpandableView {
outline.setRect(0,
mClipTopAmount,
getWidth(),
- Math.max(mActualHeight, mClipTopAmount));
+ Math.max(getActualHeight(), mClipTopAmount));
} else {
outline.setRect(mOutlineRect);
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
index c8f756e..edfbe86 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java
@@ -36,7 +36,7 @@ public abstract class ExpandableView extends FrameLayout {
private final int mMaxNotificationHeight;
private OnHeightChangedListener mOnHeightChangedListener;
- protected int mActualHeight;
+ private int mActualHeight;
protected int mClipTopAmount;
private boolean mActualHeightInitialized;
private ArrayList<View> mMatchParentViews = new ArrayList<View>();
@@ -103,6 +103,11 @@ public abstract class ExpandableView extends FrameLayout {
}
}
+ protected void resetHeight() {
+ mActualHeight = 0;
+ mActualHeightInitialized = false;
+ }
+
protected int getInitialHeight() {
return getHeight();
}