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

Commit d148ef32 authored by Miranda Kephart's avatar Miranda Kephart
Browse files

Small fixes to screenshot->long screenshot transition

Hide the enterTransitionView so it doesn't conflict with the
"shared transition" view. Also turn off activity animations so
that the LongScreenshotActivity appears immediately instead of
fading in from the previous app.

Bug: 183197533
Test: manual
Change-Id: I6fba0012c72201f23c644148dde73a35627ee761
parent 87d84d5e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:scaleType="matrix"
        android:visibility="invisible"
        app:layout_constraintTop_toTopOf="@id/preview"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
+0 −2
Original line number Diff line number Diff line
@@ -200,7 +200,6 @@ public class LongScreenshotActivity extends Activity {
                        / (float) mLongScreenshot.getHeight());

        mEnterTransitionView.setImageDrawable(drawable);

        mEnterTransitionView.getViewTreeObserver().addOnPreDrawListener(
                new ViewTreeObserver.OnPreDrawListener() {
                    @Override
@@ -220,7 +219,6 @@ public class LongScreenshotActivity extends Activity {
                                        mCropView.animateEntrance();
                                        mCropView.setVisibility(View.VISIBLE);
                                        setButtonsEnabled(true);
                                        mEnterTransitionView.setVisibility(View.GONE);
                                    });
                        });
                        return true;
+2 −6
Original line number Diff line number Diff line
@@ -682,12 +682,8 @@ public class ScreenshotController {
                        intent.setFlags(
                                Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);

                        Pair<ActivityOptions, ExitTransitionCoordinator> transition =
                                ActivityOptions.startSharedElementAnimation(mWindow,
                                        new ScreenshotExitTransitionCallbacksSupplier(false).get(),
                                        null);
                        transition.second.startExit();
                        mContext.startActivity(intent, transition.first.toBundle());
                        mContext.startActivity(intent,
                                ActivityOptions.makeCustomAnimation(mContext, 0, 0).toBundle());
                        RemoteAnimationAdapter runner = new RemoteAnimationAdapter(
                                SCREENSHOT_REMOTE_RUNNER, 0, 0);
                        try {