mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user