summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/AppsCustomizeTabHost.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/AppsCustomizeTabHost.java')
-rw-r--r--src/com/android/launcher2/AppsCustomizeTabHost.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java
index a5964dfca..4639c57cc 100644
--- a/src/com/android/launcher2/AppsCustomizeTabHost.java
+++ b/src/com/android/launcher2/AppsCustomizeTabHost.java
@@ -53,6 +53,7 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
private LinearLayout mContent;
private boolean mInTransition;
+ private boolean mTransitioningToWorkspace;
private boolean mResetAfterTransition;
public AppsCustomizeTabHost(Context context, AttributeSet attrs) {
@@ -154,8 +155,23 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
+ public boolean onInterceptTouchEvent(MotionEvent ev) {
+ // If we are mid transition then intercept touch events here so we can ignore them
+ if (mInTransition) {
+ return true;
+ }
+ return super.onInterceptTouchEvent(ev);
+ };
+
@Override
public boolean onTouchEvent(MotionEvent event) {
+ // Allow touch events to fall through if we are transitioning to the workspace
+ if (mInTransition) {
+ if (mTransitioningToWorkspace) {
+ return super.onTouchEvent(event);
+ }
+ }
+
// Intercept all touch events up to the bottom of the AppsCustomizePane so they do not fall
// through to the workspace and trigger showWorkspace()
if (event.getY() < mAppsCustomizePane.getBottom()) {
@@ -349,6 +365,7 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
@Override
public void onLauncherTransitionStart(Launcher l, boolean animated, boolean toWorkspace) {
mInTransition = true;
+ mTransitioningToWorkspace = toWorkspace;
if (toWorkspace) {
// Going from All Apps -> Workspace
@@ -377,6 +394,11 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona
}
@Override
+ public void onLauncherTransitionStep(Launcher l, float t) {
+ // Do nothing
+ }
+
+ @Override
public void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace) {
mInTransition = false;
if (animated) {