summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-11-11 17:26:16 (GMT)
committerRaj Yengisetty <rajesh@cyngn.com>2014-11-11 17:32:28 (GMT)
commitb2c862c2b69636b5c23b6cac96febdd5efe6e7ad (patch)
tree20bdbed9dad3efd68ec1026e6c15cd2f8bab4b18
parent3b58d6163a54f02db9c25f710e8b0c0ab7ef10b5 (diff)
downloadandroid_packages_apps_Trebuchet-b2c862c2b69636b5c23b6cac96febdd5efe6e7ad.zip
android_packages_apps_Trebuchet-b2c862c2b69636b5c23b6cac96febdd5efe6e7ad.tar.gz
android_packages_apps_Trebuchet-b2c862c2b69636b5c23b6cac96febdd5efe6e7ad.tar.bz2
Add special case for creating Drag Bitmap when dragging All Apps button
Change-Id: Ibc2a7a7ab1779c6b2faa7f4ef1c3859262567ba4
-rw-r--r--src/com/android/launcher3/Workspace.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index e935c99..ecf618c 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -2767,6 +2767,18 @@ public class Workspace extends SmoothPagedView
v.getWidth() + padding, v.getHeight() + padding, Bitmap.Config.ARGB_8888);
}
+ // Special case for dragging All Apps button
+ if (v.getTag() instanceof ItemInfo) {
+ ItemInfo info = (ItemInfo) v.getTag();
+ if (info.itemType == LauncherSettings.Favorites.ITEM_TYPE_ALLAPPS) {
+ // Special case for all apps icon
+ Drawable d = ((TextView) v).getCompoundDrawables()[1];
+ Rect r = d.getBounds();
+ b = Bitmap.createBitmap(r.width() + padding,
+ r.height() + padding, Bitmap.Config.ARGB_8888);
+ }
+ }
+
canvas.setBitmap(b);
drawDragView(v, canvas, padding, true);
canvas.setBitmap(null);