summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/BubbleTextView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/BubbleTextView.java')
-rw-r--r--src/com/android/launcher2/BubbleTextView.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index 01417bf37..6227611d8 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -65,6 +65,7 @@ public class BubbleTextView extends TextView {
private Drawable mBackground;
private boolean mStayPressed;
+ private CheckLongPressHelper mLongPressHelper;
public BubbleTextView(Context context) {
super(context);
@@ -82,6 +83,7 @@ public class BubbleTextView extends TextView {
}
private void init() {
+ mLongPressHelper = new CheckLongPressHelper(this);
mBackground = getBackground();
final Resources res = getContext().getResources();
@@ -222,6 +224,8 @@ public class BubbleTextView extends TextView {
} else {
mDidInvalidateForPressedState = false;
}
+
+ mLongPressHelper.postCheckForLongPress();
break;
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
@@ -230,6 +234,8 @@ public class BubbleTextView extends TextView {
if (!isPressed()) {
mPressedOrFocusedBackground = null;
}
+
+ mLongPressHelper.cancelLongPress();
break;
}
return result;
@@ -318,4 +324,11 @@ public class BubbleTextView extends TextView {
}
return true;
}
+
+ @Override
+ public void cancelLongPress() {
+ super.cancelLongPress();
+
+ mLongPressHelper.cancelLongPress();
+ }
}