am a3234f01: am 9c76f61d: Merge "DO NOT MERGE: Reduce delay of floating toolbar appearance." into mnc-dr-dev
* commit 'a3234f01927e6908cc4e08ddcff9c1646d5a91bb': DO NOT MERGE: Reduce delay of floating toolbar appearance.
This commit is contained in:
@@ -35,7 +35,7 @@ import java.util.Arrays;
|
||||
public class FloatingActionMode extends ActionMode {
|
||||
|
||||
private static final int MAX_HIDE_DURATION = 3000;
|
||||
private static final int MOVING_HIDE_DELAY = 300;
|
||||
private static final int MOVING_HIDE_DELAY = 50;
|
||||
|
||||
private final Context mContext;
|
||||
private final ActionMode.Callback2 mCallback;
|
||||
@@ -181,7 +181,6 @@ public class FloatingActionMode extends ActionMode {
|
||||
// Content rect is moving.
|
||||
mOriginatingView.removeCallbacks(mMovingOff);
|
||||
mFloatingToolbarVisibilityHelper.setMoving(true);
|
||||
mFloatingToolbarVisibilityHelper.updateToolbarVisibility();
|
||||
mOriginatingView.postDelayed(mMovingOff, MOVING_HIDE_DELAY);
|
||||
|
||||
mFloatingToolbar.setContentRect(mContentRectOnScreen);
|
||||
@@ -189,9 +188,9 @@ public class FloatingActionMode extends ActionMode {
|
||||
}
|
||||
} else {
|
||||
mFloatingToolbarVisibilityHelper.setOutOfBounds(true);
|
||||
mFloatingToolbarVisibilityHelper.updateToolbarVisibility();
|
||||
mContentRectOnScreen.setEmpty();
|
||||
}
|
||||
mFloatingToolbarVisibilityHelper.updateToolbarVisibility();
|
||||
|
||||
mPreviousContentRectOnScreen.set(mContentRectOnScreen);
|
||||
}
|
||||
|
||||
@@ -1488,10 +1488,9 @@ public final class FloatingToolbar {
|
||||
private static AnimatorSet createEnterAnimation(View view) {
|
||||
AnimatorSet animation = new AnimatorSet();
|
||||
animation.playTogether(
|
||||
ObjectAnimator.ofFloat(view, View.ALPHA, 0, 1).setDuration(200),
|
||||
ObjectAnimator.ofFloat(view, View.ALPHA, 0, 1).setDuration(150),
|
||||
// Make sure that view.x is always fixed throughout the duration of this animation.
|
||||
ObjectAnimator.ofFloat(view, View.X, view.getX(), view.getX()));
|
||||
animation.setStartDelay(50);
|
||||
return animation;
|
||||
}
|
||||
|
||||
@@ -1506,7 +1505,7 @@ public final class FloatingToolbar {
|
||||
View view, int startDelay, Animator.AnimatorListener listener) {
|
||||
AnimatorSet animation = new AnimatorSet();
|
||||
animation.playTogether(
|
||||
ObjectAnimator.ofFloat(view, View.ALPHA, 1, 0).setDuration(200));
|
||||
ObjectAnimator.ofFloat(view, View.ALPHA, 1, 0).setDuration(100));
|
||||
animation.setStartDelay(startDelay);
|
||||
animation.addListener(listener);
|
||||
return animation;
|
||||
|
||||
Reference in New Issue
Block a user