summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Selim Cinek <cinek@google.com> 2016-02-11 18:07:43 -0800
committer Selim Cinek <cinek@google.com> 2016-02-11 18:10:21 -0800
commit6f4fcdc4e6a138ec0733e0d37c05afeb2e96dcbc (patch)
treee0ad35a4b4f0559557f82a3a7fa833f522bceab1
parenta40915077f8b210eeb7875944b3e824546f0f7cb (diff)
Fixed a transformation error when fading in views
Views could still be stuck in a old translation and therefore the whole view looked weird. Change-Id: I48a8f8824d8e5bdb0913a24783967a36c34797a8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
index 5832d86628af..67d31be7f511 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/TransformState.java
@@ -293,14 +293,19 @@ public class TransformState {
mTransformedView.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
mTransformedView.setAlpha(visible ? 1.0f : 0.0f);
if (visible) {
- mTransformedView.setTranslationX(0);
- mTransformedView.setTranslationY(0);
- mTransformedView.setScaleX(1.0f);
- mTransformedView.setScaleY(1.0f);
+ resetTransformedView();
}
}
public void prepareFadeIn() {
+ resetTransformedView();
+ }
+
+ private void resetTransformedView() {
+ mTransformedView.setTranslationX(0);
+ mTransformedView.setTranslationY(0);
+ mTransformedView.setScaleX(1.0f);
+ mTransformedView.setScaleY(1.0f);
}
public static TransformState obtain() {