summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/BubbleTextView.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-02-23 15:23:44 -0800
committerWinson Chung <winsonc@google.com>2012-02-23 15:23:56 -0800
commit88f334571fe41df620ba903ced9b2c69b0170d5c (patch)
tree10cab22bd80262aa11dfc12238eb07394a2b0bf6 /src/com/android/launcher2/BubbleTextView.java
parent72d598400da7cef9c7fc4f99bb1fcd7ff0710011 (diff)
downloadandroid_packages_apps_Trebuchet-88f334571fe41df620ba903ced9b2c69b0170d5c.tar.gz
android_packages_apps_Trebuchet-88f334571fe41df620ba903ced9b2c69b0170d5c.tar.bz2
android_packages_apps_Trebuchet-88f334571fe41df620ba903ced9b2c69b0170d5c.zip
Lowering long press time for workspace items.
Change-Id: I6a3b0e13681f07d0e50bf2dcec777037c4ef51a5
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();
+ }
}