From 26cbf3a0016a19c20f953ccd07242bdf875da0fa Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 6 Jan 2011 16:25:55 -0800 Subject: [PATCH] Minor fixes to stop crashing on panning/dragging on phones. Change-Id: Ibfc0072d6db039b97876702b2c0577359a7ae567 --- src/com/android/launcher2/CellLayout.java | 2 +- src/com/android/launcher2/Launcher.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index 53a584e0bc..4e618aff1d 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -474,7 +474,7 @@ public class CellLayout extends ViewGroup implements Dimmable { // When we're small, we are either drawn normally or in the "accepts drops" state (during // a drag). However, we also drag the mini hover background *over* one of those two // backgrounds - if (mBackgroundAlpha > 0.0f) { + if (LauncherApplication.isScreenXLarge() && mBackgroundAlpha > 0.0f) { Drawable bg; boolean mini = getScaleX() < 0.5f; diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index ee9e7a872d..83f13aa11e 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -995,9 +995,9 @@ public final class Launcher extends Activity final View configureButton = findViewById(R.id.configure_button); if (LauncherApplication.isScreenXLarge()) { - mDeleteZone.setOverlappingViews(new View[] { allAppsButton, divider, configureButton }); + deleteZone.setOverlappingViews(new View[] { allAppsButton, divider, configureButton }); } else { - deleteZone.setOverlappingView(configureButton); + deleteZone.setOverlappingView(findViewById(R.id.all_apps_button_cluster)); } dragController.addDragListener(deleteZone);