Tweaking pickup animation, vibration and removing glow from drag view.
Change-Id: I8c9741e8b63ca9a0fc4af90e178dbb02fa912d83
This commit is contained in:
parent
88f334571f
commit
61b0c69d3f
|
@ -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 -->
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue