From e6235dd225404239b55c459245543f3302326112 Mon Sep 17 00:00:00 2001 From: Michael Jurka Date: Tue, 4 Oct 2011 15:02:05 -0700 Subject: [PATCH] Removing click delay from hotseat Change-Id: I9b227b387f43f2cc446ec93c65a7307ca8be53e8 --- src/com/android/launcher2/BubbleTextView.java | 2 +- src/com/android/launcher2/CellLayout.java | 5 +++++ src/com/android/launcher2/CellLayoutChildren.java | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java index cdc89ba610..51fdc2eb6e 100644 --- a/src/com/android/launcher2/BubbleTextView.java +++ b/src/com/android/launcher2/BubbleTextView.java @@ -221,7 +221,7 @@ public class BubbleTextView extends TextView { // have to call invalidate as soon as the state is "pressed" if (isPressed()) { mDidInvalidateForPressedState = true; - invalidate(); + setCellLayoutPressedOrFocusedIcon(); } else { mDidInvalidateForPressedState = false; } diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index c2e48e886c..ad87fa6036 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -638,6 +638,11 @@ public class CellLayout extends ViewGroup { invalidate(); } + @Override + public boolean shouldDelayChildPressedState() { + return false; + } + @Override public void cancelLongPress() { super.cancelLongPress(); diff --git a/src/com/android/launcher2/CellLayoutChildren.java b/src/com/android/launcher2/CellLayoutChildren.java index ac8c2ca160..35f5af1044 100644 --- a/src/com/android/launcher2/CellLayoutChildren.java +++ b/src/com/android/launcher2/CellLayoutChildren.java @@ -121,6 +121,11 @@ public class CellLayoutChildren extends ViewGroup { } } + @Override + public boolean shouldDelayChildPressedState() { + return false; + } + @Override public void requestChildFocus(View child, View focused) { super.requestChildFocus(child, focused);