summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/BubbleTextView.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-06-23 09:34:06 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-06-23 11:02:02 -0700
commit4e5a878bc474c4aa77d48b3cd7f06f3c50013eb7 (patch)
treef8855f49d777d747a4cc4ff0bbb20ae0c26e59f5 /src/com/android/launcher3/BubbleTextView.java
parent9314b7c01d932093c730dd39b9b9842d1a56efdb (diff)
downloadandroid_packages_apps_Trebuchet-4e5a878bc474c4aa77d48b3cd7f06f3c50013eb7.tar.gz
android_packages_apps_Trebuchet-4e5a878bc474c4aa77d48b3cd7f06f3c50013eb7.tar.bz2
android_packages_apps_Trebuchet-4e5a878bc474c4aa77d48b3cd7f06f3c50013eb7.zip
Fixing two different implementations for animating text alpha
The animator in BubbleTextView maintains an internal state which was getting invalidated by the FolderAnimator. Change-Id: I53885fe8f1773ca62fe59f1712056f02ff9a749f
Diffstat (limited to 'src/com/android/launcher3/BubbleTextView.java')
-rw-r--r--src/com/android/launcher3/BubbleTextView.java22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index 2306b1bf3..6f2c89779 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -16,7 +16,6 @@
package com.android.launcher3;
-import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.content.res.ColorStateList;
@@ -70,7 +69,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
private final Launcher mLauncher;
private Drawable mIcon;
private final boolean mCenterVertically;
- private OnLongClickListener mOnLongClickListener;
+
private final CheckLongPressHelper mLongPressHelper;
private final HolographicOutlineHelper mOutlineHelper;
private final StylusEventHelper mStylusEventHelper;
@@ -107,7 +106,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
}
};
- private static final Property<BubbleTextView, Integer> TEXT_ALPHA_PROPERTY
+ public static final Property<BubbleTextView, Integer> TEXT_ALPHA_PROPERTY
= new Property<BubbleTextView, Integer>(Integer.class, "textAlpha") {
@Override
public Integer get(BubbleTextView bubbleTextView) {
@@ -264,21 +263,6 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
return mIcon;
}
- /** Returns whether the layout is horizontal. */
- public boolean isLayoutHorizontal() {
- return mLayoutHorizontal;
- }
-
- @Override
- public void setOnLongClickListener(OnLongClickListener l) {
- super.setOnLongClickListener(l);
- mOnLongClickListener = l;
- }
-
- public OnLongClickListener getOnLongClickListener() {
- return mOnLongClickListener;
- }
-
@Override
public boolean onTouchEvent(MotionEvent event) {
// Call the superclass onTouchEvent first, because sometimes it changes the state to
@@ -474,7 +458,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver {
* Creates an animator to fade the text in or out.
* @param fadeIn Whether the text should fade in or fade out.
*/
- public Animator createTextAlphaAnimator(boolean fadeIn) {
+ public ObjectAnimator createTextAlphaAnimator(boolean fadeIn) {
return ObjectAnimator.ofInt(this, TEXT_ALPHA_PROPERTY, fadeIn ? Color.alpha(mTextColor) : 0);
}