From 83cdca67ba880eaea8b18f3ef9b09dce75399f7b Mon Sep 17 00:00:00 2001 From: Jon Miranda Date: Mon, 15 Apr 2019 13:01:05 -0700 Subject: [PATCH] Fix bug where BubbleTextView text fades in after long press. Introduced by Ieeb5d7b8fb389a2f7ee263d38b3021ffdefefd93. Change-Id: I45e180dda09f03297530e5b5575b71f60c03fb5f --- src/com/android/launcher3/BubbleTextView.java | 3 +-- src/com/android/launcher3/views/FloatingIconView.java | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java index 4dd2e0a764..d75006e893 100644 --- a/src/com/android/launcher3/BubbleTextView.java +++ b/src/com/android/launcher3/BubbleTextView.java @@ -480,8 +480,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, */ public ObjectAnimator createTextAlphaAnimator(boolean fadeIn) { float toAlpha = shouldTextBeVisible() && fadeIn ? 1 : 0; - float fromAlpha = toAlpha == 1 ? 0 : 1f; - return ObjectAnimator.ofFloat(this, TEXT_ALPHA_PROPERTY, fromAlpha, toAlpha); + return ObjectAnimator.ofFloat(this, TEXT_ALPHA_PROPERTY, toAlpha); } @Override diff --git a/src/com/android/launcher3/views/FloatingIconView.java b/src/com/android/launcher3/views/FloatingIconView.java index fab21fadae..524c69f181 100644 --- a/src/com/android/launcher3/views/FloatingIconView.java +++ b/src/com/android/launcher3/views/FloatingIconView.java @@ -421,12 +421,6 @@ public class FloatingIconView extends View implements Animator.AnimatorListener, @Override public void onAnimationStart(Animator animation) { originalView.setVisibility(VISIBLE); - - if (originalView instanceof FolderIcon) { - FolderIcon folderIcon = (FolderIcon) originalView; - folderIcon.setBackgroundVisible(false); - folderIcon.getFolderName().setTextVisibility(false); - } } @Override @@ -441,6 +435,8 @@ public class FloatingIconView extends View implements Animator.AnimatorListener, if (originalView instanceof FolderIcon) { FolderIcon folderIcon = (FolderIcon) originalView; + folderIcon.setBackgroundVisible(false); + folderIcon.getFolderName().setTextVisibility(false); fade.play(folderIcon.getFolderName().createTextAlphaAnimator(true)); fade.addListener(new AnimatorListenerAdapter() { @Override