diff --git a/res/drawable-hdpi/all_apps_button_focused.png b/res/drawable-hdpi/all_apps_button_focused.png
index 94f7b080ab..55574ed63f 100644
Binary files a/res/drawable-hdpi/all_apps_button_focused.png and b/res/drawable-hdpi/all_apps_button_focused.png differ
diff --git a/res/drawable-hdpi/all_apps_button_normal.png b/res/drawable-hdpi/all_apps_button_normal.png
index 188d528aa0..7e7ec868dd 100644
Binary files a/res/drawable-hdpi/all_apps_button_normal.png and b/res/drawable-hdpi/all_apps_button_normal.png differ
diff --git a/res/drawable-hdpi/all_apps_button_pressed.png b/res/drawable-hdpi/all_apps_button_pressed.png
index 600dea9fec..3ccb5afb7b 100644
Binary files a/res/drawable-hdpi/all_apps_button_pressed.png and b/res/drawable-hdpi/all_apps_button_pressed.png differ
diff --git a/res/drawable-hdpi/hotseat_bg_center.9.png b/res/drawable-hdpi/hotseat_bg_center.9.png
new file mode 100644
index 0000000000..0567b77650
Binary files /dev/null and b/res/drawable-hdpi/hotseat_bg_center.9.png differ
diff --git a/res/drawable-hdpi/hotseat_bg_left.9.png b/res/drawable-hdpi/hotseat_bg_left.9.png
new file mode 100644
index 0000000000..aaf42c4f0c
Binary files /dev/null and b/res/drawable-hdpi/hotseat_bg_left.9.png differ
diff --git a/res/drawable-hdpi/hotseat_bg_right.9.png b/res/drawable-hdpi/hotseat_bg_right.9.png
new file mode 100644
index 0000000000..2b8149b6e1
Binary files /dev/null and b/res/drawable-hdpi/hotseat_bg_right.9.png differ
diff --git a/res/drawable-hdpi/hotseat_browser_focused.png b/res/drawable-hdpi/hotseat_browser_focused.png
new file mode 100644
index 0000000000..6044238ca1
Binary files /dev/null and b/res/drawable-hdpi/hotseat_browser_focused.png differ
diff --git a/res/drawable-hdpi/hotseat_browser_normal.png b/res/drawable-hdpi/hotseat_browser_normal.png
new file mode 100644
index 0000000000..e6eb94e379
Binary files /dev/null and b/res/drawable-hdpi/hotseat_browser_normal.png differ
diff --git a/res/drawable-hdpi/hotseat_browser_pressed.png b/res/drawable-hdpi/hotseat_browser_pressed.png
new file mode 100644
index 0000000000..918afb4430
Binary files /dev/null and b/res/drawable-hdpi/hotseat_browser_pressed.png differ
diff --git a/res/drawable-hdpi/hotseat_left.png b/res/drawable-hdpi/hotseat_left.png
new file mode 100644
index 0000000000..5dabf57ec9
Binary files /dev/null and b/res/drawable-hdpi/hotseat_left.png differ
diff --git a/res/drawable-hdpi/hotseat_phone_focused.png b/res/drawable-hdpi/hotseat_phone_focused.png
new file mode 100644
index 0000000000..3e84a583bf
Binary files /dev/null and b/res/drawable-hdpi/hotseat_phone_focused.png differ
diff --git a/res/drawable-hdpi/hotseat_phone_normal.png b/res/drawable-hdpi/hotseat_phone_normal.png
new file mode 100644
index 0000000000..e8a869c52f
Binary files /dev/null and b/res/drawable-hdpi/hotseat_phone_normal.png differ
diff --git a/res/drawable-hdpi/hotseat_phone_pressed.png b/res/drawable-hdpi/hotseat_phone_pressed.png
new file mode 100644
index 0000000000..dc4ad6e6ee
Binary files /dev/null and b/res/drawable-hdpi/hotseat_phone_pressed.png differ
diff --git a/res/drawable-hdpi/hotseat_right.png b/res/drawable-hdpi/hotseat_right.png
new file mode 100644
index 0000000000..114bcb588d
Binary files /dev/null and b/res/drawable-hdpi/hotseat_right.png differ
diff --git a/res/drawable-hdpi/trashcan.png b/res/drawable-hdpi/trashcan.png
index d356f45333..482fbd8882 100644
Binary files a/res/drawable-hdpi/trashcan.png and b/res/drawable-hdpi/trashcan.png differ
diff --git a/res/drawable-hdpi/trashcan_hover.png b/res/drawable-hdpi/trashcan_hover.png
index 7dda19e040..484acef591 100644
Binary files a/res/drawable-hdpi/trashcan_hover.png and b/res/drawable-hdpi/trashcan_hover.png differ
diff --git a/res/drawable-land-hdpi/hotseat_bg_center.9.png b/res/drawable-land-hdpi/hotseat_bg_center.9.png
new file mode 100644
index 0000000000..f6a59fa6da
Binary files /dev/null and b/res/drawable-land-hdpi/hotseat_bg_center.9.png differ
diff --git a/res/drawable-land-hdpi/hotseat_bg_left.9.png b/res/drawable-land-hdpi/hotseat_bg_left.9.png
new file mode 100644
index 0000000000..8320e73926
Binary files /dev/null and b/res/drawable-land-hdpi/hotseat_bg_left.9.png differ
diff --git a/res/drawable-land-hdpi/hotseat_bg_right.9.png b/res/drawable-land-hdpi/hotseat_bg_right.9.png
new file mode 100644
index 0000000000..2d74f2bb9f
Binary files /dev/null and b/res/drawable-land-hdpi/hotseat_bg_right.9.png differ
diff --git a/res/drawable-mdpi/all_apps_button_focused.png b/res/drawable-mdpi/all_apps_button_focused.png
index f026ee457f..a9d5a3f595 100644
Binary files a/res/drawable-mdpi/all_apps_button_focused.png and b/res/drawable-mdpi/all_apps_button_focused.png differ
diff --git a/res/drawable-mdpi/all_apps_button_normal.png b/res/drawable-mdpi/all_apps_button_normal.png
index eb3c85d65e..227215b417 100644
Binary files a/res/drawable-mdpi/all_apps_button_normal.png and b/res/drawable-mdpi/all_apps_button_normal.png differ
diff --git a/res/drawable-mdpi/all_apps_button_pressed.png b/res/drawable-mdpi/all_apps_button_pressed.png
index 1f44aa14af..e243252425 100644
Binary files a/res/drawable-mdpi/all_apps_button_pressed.png and b/res/drawable-mdpi/all_apps_button_pressed.png differ
diff --git a/res/drawable-mdpi/home_button_focused.png b/res/drawable-mdpi/home_button_focused.png
index 75767ef9e5..29fcbd0697 100644
Binary files a/res/drawable-mdpi/home_button_focused.png and b/res/drawable-mdpi/home_button_focused.png differ
diff --git a/res/drawable-mdpi/home_button_normal.png b/res/drawable-mdpi/home_button_normal.png
index 8229bee64b..58ff95887b 100644
Binary files a/res/drawable-mdpi/home_button_normal.png and b/res/drawable-mdpi/home_button_normal.png differ
diff --git a/res/drawable-mdpi/home_button_pressed.png b/res/drawable-mdpi/home_button_pressed.png
index 1ff1a30b8e..32337d623b 100644
Binary files a/res/drawable-mdpi/home_button_pressed.png and b/res/drawable-mdpi/home_button_pressed.png differ
diff --git a/res/drawable-mdpi/hotseat_bg_center.9.png b/res/drawable-mdpi/hotseat_bg_center.9.png
new file mode 100644
index 0000000000..fd36361825
Binary files /dev/null and b/res/drawable-mdpi/hotseat_bg_center.9.png differ
diff --git a/res/drawable-mdpi/hotseat_bg_left.9.png b/res/drawable-mdpi/hotseat_bg_left.9.png
new file mode 100644
index 0000000000..180bcbbb24
Binary files /dev/null and b/res/drawable-mdpi/hotseat_bg_left.9.png differ
diff --git a/res/drawable-mdpi/hotseat_bg_right.9.png b/res/drawable-mdpi/hotseat_bg_right.9.png
new file mode 100644
index 0000000000..88967a0acc
Binary files /dev/null and b/res/drawable-mdpi/hotseat_bg_right.9.png differ
diff --git a/res/drawable-mdpi/hotseat_browser_focused.png b/res/drawable-mdpi/hotseat_browser_focused.png
new file mode 100644
index 0000000000..de8defc304
Binary files /dev/null and b/res/drawable-mdpi/hotseat_browser_focused.png differ
diff --git a/res/drawable-mdpi/hotseat_browser_normal.png b/res/drawable-mdpi/hotseat_browser_normal.png
new file mode 100644
index 0000000000..35205a2365
Binary files /dev/null and b/res/drawable-mdpi/hotseat_browser_normal.png differ
diff --git a/res/drawable-mdpi/hotseat_browser_pressed.png b/res/drawable-mdpi/hotseat_browser_pressed.png
new file mode 100644
index 0000000000..d0a072e28f
Binary files /dev/null and b/res/drawable-mdpi/hotseat_browser_pressed.png differ
diff --git a/res/drawable-mdpi/hotseat_phone_focused.png b/res/drawable-mdpi/hotseat_phone_focused.png
new file mode 100644
index 0000000000..15ec1c608d
Binary files /dev/null and b/res/drawable-mdpi/hotseat_phone_focused.png differ
diff --git a/res/drawable-mdpi/hotseat_phone_normal.png b/res/drawable-mdpi/hotseat_phone_normal.png
new file mode 100644
index 0000000000..d759b1f6bb
Binary files /dev/null and b/res/drawable-mdpi/hotseat_phone_normal.png differ
diff --git a/res/drawable-mdpi/hotseat_phone_pressed.png b/res/drawable-mdpi/hotseat_phone_pressed.png
new file mode 100644
index 0000000000..fcdf073160
Binary files /dev/null and b/res/drawable-mdpi/hotseat_phone_pressed.png differ
diff --git a/res/drawable-mdpi/trashcan.png b/res/drawable-mdpi/trashcan.png
index a8c0fb5b9d..4f01d76fdc 100644
Binary files a/res/drawable-mdpi/trashcan.png and b/res/drawable-mdpi/trashcan.png differ
diff --git a/res/drawable-mdpi/trashcan_hover.png b/res/drawable-mdpi/trashcan_hover.png
index d4fe3a4984..fb7474a5f1 100644
Binary files a/res/drawable-mdpi/trashcan_hover.png and b/res/drawable-mdpi/trashcan_hover.png differ
diff --git a/res/drawable/hotseat_browser.xml b/res/drawable/hotseat_browser.xml
new file mode 100644
index 0000000000..3c327bf35b
--- /dev/null
+++ b/res/drawable/hotseat_browser.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/res/drawable/hotseat_phone.xml b/res/drawable/hotseat_phone.xml
new file mode 100644
index 0000000000..318a81ebe6
--- /dev/null
+++ b/res/drawable/hotseat_phone.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 44e1cfb55a..22b4825bfe 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -75,24 +75,11 @@
android:focusable="true"
android:clickable="true" />
-
-
+
+
+
+
+
+
+
+
+
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index b1b1736c91..3b181d1365 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -63,26 +63,12 @@
android:scaleType="center"
android:src="@drawable/home_arrows_right"
-
+
android:onClick="nextScreen"
-
+
android:focusable="true"
android:clickable="true" />
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml
new file mode 100644
index 0000000000..251c717e16
--- /dev/null
+++ b/res/values-land/styles.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 132a1ce558..5e3bb98efb 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -16,5 +16,15 @@
120px
+
+
56dip
+
+
+ 56dip
+
+
+ 12dip
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f90810fd37..c2082111cc 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -65,4 +65,23 @@
- 10dip
+
+
+
+
diff --git a/src/com/android/launcher2/DeleteZone.java b/src/com/android/launcher2/DeleteZone.java
index 9065de494e..3a6c63d8b2 100644
--- a/src/com/android/launcher2/DeleteZone.java
+++ b/src/com/android/launcher2/DeleteZone.java
@@ -183,15 +183,7 @@ public class DeleteZone extends ImageView implements DropTarget, DragController.
animationSet.setDuration(ANIMATION_DURATION);
}
if (mHandleInAnimation == null) {
- if (mOrientation == ORIENTATION_HORIZONTAL) {
- mHandleInAnimation = new TranslateAnimation(Animation.ABSOLUTE, 0.0f,
- Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f,
- Animation.RELATIVE_TO_SELF, 0.0f);
- } else {
- mHandleInAnimation = new TranslateAnimation(Animation.RELATIVE_TO_SELF,
- 1.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.ABSOLUTE, 0.0f,
- Animation.ABSOLUTE, 0.0f);
- }
+ mHandleInAnimation = new AlphaAnimation(0.0f, 1.0f);
mHandleInAnimation.setDuration(ANIMATION_DURATION);
}
if (mOutAnimation == null) {
@@ -211,15 +203,7 @@ public class DeleteZone extends ImageView implements DropTarget, DragController.
animationSet.setDuration(ANIMATION_DURATION);
}
if (mHandleOutAnimation == null) {
- if (mOrientation == ORIENTATION_HORIZONTAL) {
- mHandleOutAnimation = new FastTranslateAnimation(Animation.ABSOLUTE, 0.0f,
- Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
- Animation.RELATIVE_TO_SELF, 1.0f);
- } else {
- mHandleOutAnimation = new FastTranslateAnimation(Animation.RELATIVE_TO_SELF,
- 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.ABSOLUTE, 0.0f,
- Animation.ABSOLUTE, 0.0f);
- }
+ mHandleOutAnimation = new AlphaAnimation(1.0f, 0.0f);
mHandleOutAnimation.setFillAfter(true);
mHandleOutAnimation.setDuration(ANIMATION_DURATION);
}
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 868a9d17fe..5a2a7d37eb 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -26,12 +26,14 @@ import android.app.StatusBarManager;
import android.app.WallpaperManager;
import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
+import android.content.ComponentName;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.Intent.ShortcutIconResource;
import android.content.IntentFilter;
+import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -41,6 +43,7 @@ import android.graphics.Rect;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ColorDrawable;
+import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcelable;
@@ -197,6 +200,17 @@ public final class Launcher extends Activity
private ImageView mPreviousView;
private ImageView mNextView;
+ // Hotseats (quick-launch icons next to AllApps)
+ // TODO: move these intial intents out to Uris in an XML resource
+ private static final int NUM_HOTSEATS = 2;
+ private Intent[] mHotseats = new Intent[] {
+ new Intent(Intent.ACTION_MAIN)
+ .setComponent(ComponentName.unflattenFromString(
+ "com.android.contacts/.ContactsLaunchActivity")),
+ new Intent(Intent.ACTION_WEB_SEARCH, Uri.EMPTY),
+ };
+ private CharSequence[] mHotseatLabels = new CharSequence[2];
+
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -215,6 +229,7 @@ public final class Launcher extends Activity
android.os.Debug.startMethodTracing("/sdcard/launcher");
}
+ loadHotseats();
checkForLocaleChange();
setWallpaperDimension();
@@ -273,6 +288,8 @@ public final class Launcher extends Activity
writeConfiguration(this, localeConfiguration);
mIconCache.flush();
+
+ loadHotseats();
}
}
@@ -351,6 +368,44 @@ public final class Launcher extends Activity
wpm.suggestDesiredDimensions(width * WALLPAPER_SCREENS_SPAN, height);
}
+ private void loadHotseats() {
+ PackageManager pm = getPackageManager();
+ for (int i=0; i= 0 && mHotseats[index] != null) {
+ startActivitySafely(
+ mHotseats[index],
+ "hotseat"
+ );
+ }
+ }
/**
* Creates a view representing a shortcut.
@@ -1280,7 +1355,7 @@ public final class Launcher extends Activity
startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(this, R.string.activity_not_found, Toast.LENGTH_SHORT).show();
- Log.e(TAG, "Unable to launch. tag=" + tag + " intent=" + intent);
+ Log.e(TAG, "Unable to launch. tag=" + tag + " intent=" + intent, e);
} catch (SecurityException e) {
Toast.makeText(this, R.string.activity_not_found, Toast.LENGTH_SHORT).show();
Log.e(TAG, "Launcher does not have the permission to launch " + intent +