Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d9a7e4f authored by Kerong Sui's avatar Kerong Sui Committed by Steve Kondik
Browse files

Gallery2: reduce the latency between cam&camcorder switch

There are animations of fadeIn and fadeOut effect when switching
from camera to camcorder or vice-versa which all last 300ms, thus
the black UI observed too long. Set the animator duration to a tiny
value for reducing this latency.

Change-Id: I9cee228e641ad82e7001e091944a30515f96ab2e
parent 84b9abcc
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -187,7 +187,7 @@ public class CameraActivity extends ActivityBase
                    mCameraSwitchAnimator.cancel();
                }
                mCameraSwitchAnimator = ObjectAnimator.ofFloat(
                        screenNail, "alpha", screenNail.getAlpha(), 0f);
                        screenNail, "alpha", screenNail.getAlpha(), 0f).setDuration(5);
                mCameraSwitchAnimator.addListener(new AnimatorListenerAdapter() {
                    @Override
                    public void onAnimationEnd(Animator animation) {
@@ -258,8 +258,8 @@ public class CameraActivity extends ActivityBase
        @Override
        public void run() {
            mCameraSwitchAnimator = ObjectAnimator.ofFloat(
                    getCameraScreenNail(), "alpha", 0f, 1f);
            mCameraSwitchAnimator.setStartDelay(50);
                    getCameraScreenNail(), "alpha", 0f, 1f).setDuration(5);
            mCameraSwitchAnimator.setStartDelay(5);
            mCameraSwitchAnimator.start();
        }
    };