diff options
-rw-r--r-- | res/values/config.xml | 1 | ||||
-rw-r--r-- | src/com/android/launcher2/DragController.java | 2 | ||||
-rw-r--r-- | src/com/android/launcher2/DragLayer.java | 1 | ||||
-rw-r--r-- | src/com/android/launcher2/DragView.java | 1 | ||||
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 12 |
5 files changed, 12 insertions, 5 deletions
diff --git a/res/values/config.xml b/res/values/config.xml index 259385f..c56d596 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -63,6 +63,7 @@ <!-- Parameters controlling the animation for when an item is dropped on the home screen, and it animates from its old position to the new one. --> + <integer name="config_dropAnimMinDuration">100</integer> <integer name="config_dropAnimMaxDuration">500</integer> <!-- The duration of the UserFolder opening and closing animation --> diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java index d75c164..129987f 100644 --- a/src/com/android/launcher2/DragController.java +++ b/src/com/android/launcher2/DragController.java @@ -49,7 +49,7 @@ public class DragController { private static final int SCROLL_DELAY = 500; private static final int RESCROLL_DELAY = 750; - private static final int VIBRATE_DURATION = 35; + private static final int VIBRATE_DURATION = 15; private static final boolean PROFILE_DRAWING_DURING_DRAG = false; diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java index 5e5740e..7bc9bc8 100644 --- a/src/com/android/launcher2/DragLayer.java +++ b/src/com/android/launcher2/DragLayer.java @@ -541,6 +541,7 @@ public class DragLayer extends FrameLayout { if (dist < maxDist) { duration *= mCubicEaseOutInterpolator.getInterpolation(dist / maxDist); } + duration = Math.max(duration, res.getInteger(R.integer.config_dropAnimMinDuration)); } if (mDropAnim != null) { diff --git a/src/com/android/launcher2/DragView.java b/src/com/android/launcher2/DragView.java index 1b30293..1608d08 100644 --- a/src/com/android/launcher2/DragView.java +++ b/src/com/android/launcher2/DragView.java @@ -75,7 +75,6 @@ public class DragView extends View { // Animate the view into the correct position mAnim = ValueAnimator.ofFloat(0.0f, 1.0f); mAnim.setDuration(150); - mAnim.setInterpolator(new DecelerateInterpolator(1.5f)); mAnim.addUpdateListener(new AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 94304e5..0b75521 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -58,6 +58,7 @@ import android.view.View; import android.view.ViewConfiguration; import android.view.ViewGroup; import android.view.View.MeasureSpec; +import android.view.animation.AccelerateInterpolator; import android.view.animation.DecelerateInterpolator; import android.widget.ImageView; import android.widget.TextView; @@ -365,7 +366,10 @@ public class Workspace extends SmoothPagedView mLauncher.lockScreenOrientationOnLargeUI(); // Fade out the workspace slightly to highlight the currently dragging item - animate().alpha(mDragFadeOutAlpha).setDuration(mDragFadeOutDuration).start(); + animate().alpha(mDragFadeOutAlpha) + .setInterpolator(new AccelerateInterpolator()) + .setDuration(mDragFadeOutDuration) + .start(); } public void onDragEnd() { @@ -374,7 +378,10 @@ public class Workspace extends SmoothPagedView mLauncher.unlockScreenOrientationOnLargeUI(); // Fade the workspace back in after we have completed dragging - animate().alpha(1f).setDuration(mDragFadeOutDuration).start(); + animate().alpha(1f) + .setInterpolator(new AccelerateInterpolator()) + .setDuration(mDragFadeOutDuration) + .start(); } /** @@ -1824,7 +1831,6 @@ public class Workspace extends SmoothPagedView canvas.setBitmap(b); drawDragView(v, canvas, padding, true); - mOutlineHelper.applyOuterBlur(b, canvas, outlineColor); canvas.setBitmap(null); return b; |