summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/Launcher.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2010-12-01 15:09:47 -0800
committerAdam Cohen <adamcohen@google.com>2010-12-01 20:30:56 -0800
commitcdc30d5c07ae1cd13d9ebacad8c8ff1185d87e19 (patch)
tree60b063991b0d801a0f8b796a43b3edbd85fa12af /src/com/android/launcher2/Launcher.java
parent29d6fea296ebecb607525c8245a54696ad7c5db7 (diff)
downloadandroid_packages_apps_Trebuchet-cdc30d5c07ae1cd13d9ebacad8c8ff1185d87e19.tar.gz
android_packages_apps_Trebuchet-cdc30d5c07ae1cd13d9ebacad8c8ff1185d87e19.tar.bz2
android_packages_apps_Trebuchet-cdc30d5c07ae1cd13d9ebacad8c8ff1185d87e19.zip
Removing CAB from AllApps
-Removed CAB and single selection mode -Replaced it with trash and appinfo drag targets at the top right of the tab view Change-Id: Ic4acaaef7fc71dc2ca0bffd516da31e85af1be69
Diffstat (limited to 'src/com/android/launcher2/Launcher.java')
-rw-r--r--src/com/android/launcher2/Launcher.java32
1 files changed, 30 insertions, 2 deletions
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index eacaef908..8a8ef595f 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -59,6 +59,7 @@ import android.content.res.TypedArray;
import android.database.ContentObserver;
import android.graphics.Bitmap;
import android.graphics.Canvas;
+import android.graphics.Color;
import android.graphics.Rect;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
@@ -90,8 +91,6 @@ import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.View.OnLongClickListener;
-import android.view.animation.AccelerateInterpolator;
-import android.view.animation.DecelerateInterpolator;
import android.view.inputmethod.InputMethodManager;
import android.widget.Advanceable;
import android.widget.EditText;
@@ -960,6 +959,29 @@ public final class Launcher extends Activity
deleteZone.setHandle(findViewById(deleteZoneHandleId));
dragController.addDragListener(deleteZone);
+ DeleteZone allAppsDeleteZone = (DeleteZone) findViewById(R.id.all_apps_delete_zone);
+ if (allAppsDeleteZone != null) {
+ allAppsDeleteZone.setLauncher(this);
+ allAppsDeleteZone.setDragController(dragController);
+ allAppsDeleteZone.setDragAndDropEnabled(false);
+ dragController.addDragListener(allAppsDeleteZone);
+ dragController.addDropTarget(allAppsDeleteZone);
+ }
+
+ ApplicationInfoDropTarget allAppsInfoTarget = (ApplicationInfoDropTarget)
+ findViewById(R.id.all_apps_info_target);
+ if (allAppsInfoTarget != null) {
+ allAppsInfoTarget.setLauncher(this);
+ dragController.addDragListener(allAppsInfoTarget);
+ allAppsInfoTarget.setDragColor(getResources().getColor(R.color.app_info_filter));
+ allAppsInfoTarget.setDragAndDropEnabled(false);
+ View marketButton = findViewById(R.id.market_button);
+ if (marketButton != null) {
+ marketButton.setBackgroundColor(Color.RED);
+ allAppsInfoTarget.setHandle(marketButton);
+ }
+ }
+
ApplicationInfoDropTarget infoButton = (ApplicationInfoDropTarget)findViewById(R.id.info_button);
if (infoButton != null) {
infoButton.setLauncher(this);
@@ -978,6 +1000,12 @@ public final class Launcher extends Activity
if (infoButton != null) {
dragController.addDropTarget(infoButton);
}
+ if (allAppsInfoTarget != null) {
+ dragController.addDropTarget(allAppsInfoTarget);
+ }
+ if (allAppsDeleteZone != null) {
+ dragController.addDropTarget(allAppsDeleteZone);
+ }
}
@SuppressWarnings({"UnusedDeclaration"})