summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/DragController.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2010-12-08 11:05:37 -0800
committerAdam Cohen <adamcohen@google.com>2010-12-08 22:49:08 -0800
commit120980bd00f5eecec5717f49a3d7db96571025a9 (patch)
tree5d1e2972323600cdcfe63b9abe83d0334bad4246 /src/com/android/launcher2/DragController.java
parentb5a2b2fff353a68e3f8f7e57a830a0f27724fc5f (diff)
downloadandroid_packages_apps_Trebuchet-120980bd00f5eecec5717f49a3d7db96571025a9.tar.gz
android_packages_apps_Trebuchet-120980bd00f5eecec5717f49a3d7db96571025a9.tar.bz2
android_packages_apps_Trebuchet-120980bd00f5eecec5717f49a3d7db96571025a9.zip
Adding animations to Customize drawer
-When you tap to add in customize drawer the widgets / app shortcuts now animate to the mini screens Change-Id: I0a5b5ae561fda3fbbf902003273477a5ed7ca5cc
Diffstat (limited to 'src/com/android/launcher2/DragController.java')
-rw-r--r--src/com/android/launcher2/DragController.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index a0a44a578..876ad8797 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -16,7 +16,7 @@
package com.android.launcher2;
-import com.android.launcher.R;
+import java.util.ArrayList;
import android.content.Context;
import android.graphics.Bitmap;
@@ -34,7 +34,7 @@ import android.view.ViewConfiguration;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
-import java.util.ArrayList;
+import com.android.launcher.R;
/**
* Class for initiating a drag within a view or across multiple views.
@@ -340,7 +340,7 @@ public class DragController {
/**
* Draw the view into a bitmap.
*/
- private Bitmap getViewBitmap(View v) {
+ Bitmap getViewBitmap(View v) {
v.clearFocus();
v.setPressed(false);
@@ -351,6 +351,8 @@ public class DragController {
// for the duration of this operation
int color = v.getDrawingCacheBackgroundColor();
v.setDrawingCacheBackgroundColor(0);
+ float alpha = v.getAlpha();
+ v.setAlpha(1.0f);
if (color != 0) {
v.destroyDrawingCache();
@@ -366,6 +368,7 @@ public class DragController {
// Restore the view
v.destroyDrawingCache();
+ v.setAlpha(alpha);
v.setWillNotCacheDrawing(willNotCache);
v.setDrawingCacheBackgroundColor(color);