Lowering long press time for workspace items.
Change-Id: I6a3b0e13681f07d0e50bf2dcec777037c4ef51a5
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index 01417bf..6227611 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -65,6 +65,7 @@
private Drawable mBackground;
private boolean mStayPressed;
+ private CheckLongPressHelper mLongPressHelper;
public BubbleTextView(Context context) {
super(context);
@@ -82,6 +83,7 @@
}
private void init() {
+ mLongPressHelper = new CheckLongPressHelper(this);
mBackground = getBackground();
final Resources res = getContext().getResources();
@@ -222,6 +224,8 @@
} else {
mDidInvalidateForPressedState = false;
}
+
+ mLongPressHelper.postCheckForLongPress();
break;
case MotionEvent.ACTION_CANCEL:
case MotionEvent.ACTION_UP:
@@ -230,6 +234,8 @@
if (!isPressed()) {
mPressedOrFocusedBackground = null;
}
+
+ mLongPressHelper.cancelLongPress();
break;
}
return result;
@@ -318,4 +324,11 @@
}
return true;
}
+
+ @Override
+ public void cancelLongPress() {
+ super.cancelLongPress();
+
+ mLongPressHelper.cancelLongPress();
+ }
}