Merge "Small fixes to screenshot->long screenshot transition" into sc-dev

This commit is contained in:
Miranda Kephart
2021-06-28 19:38:20 +00:00
committed by Android (Google) Code Review
3 changed files with 3 additions and 8 deletions

View File

@@ -78,6 +78,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:scaleType="matrix" android:scaleType="matrix"
android:visibility="invisible"
app:layout_constraintTop_toTopOf="@id/preview" app:layout_constraintTop_toTopOf="@id/preview"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"

View File

@@ -200,7 +200,6 @@ public class LongScreenshotActivity extends Activity {
/ (float) mLongScreenshot.getHeight()); / (float) mLongScreenshot.getHeight());
mEnterTransitionView.setImageDrawable(drawable); mEnterTransitionView.setImageDrawable(drawable);
mEnterTransitionView.getViewTreeObserver().addOnPreDrawListener( mEnterTransitionView.getViewTreeObserver().addOnPreDrawListener(
new ViewTreeObserver.OnPreDrawListener() { new ViewTreeObserver.OnPreDrawListener() {
@Override @Override
@@ -220,7 +219,6 @@ public class LongScreenshotActivity extends Activity {
mCropView.animateEntrance(); mCropView.animateEntrance();
mCropView.setVisibility(View.VISIBLE); mCropView.setVisibility(View.VISIBLE);
setButtonsEnabled(true); setButtonsEnabled(true);
mEnterTransitionView.setVisibility(View.GONE);
}); });
}); });
return true; return true;

View File

@@ -690,12 +690,8 @@ public class ScreenshotController {
intent.setFlags( intent.setFlags(
Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP); Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
Pair<ActivityOptions, ExitTransitionCoordinator> transition = mContext.startActivity(intent,
ActivityOptions.startSharedElementAnimation(mWindow, ActivityOptions.makeCustomAnimation(mContext, 0, 0).toBundle());
new ScreenshotExitTransitionCallbacksSupplier(false).get(),
null);
transition.second.startExit();
mContext.startActivity(intent, transition.first.toBundle());
RemoteAnimationAdapter runner = new RemoteAnimationAdapter( RemoteAnimationAdapter runner = new RemoteAnimationAdapter(
SCREENSHOT_REMOTE_RUNNER, 0, 0); SCREENSHOT_REMOTE_RUNNER, 0, 0);
try { try {