I have implemented shared element image transition with recycler view and its working fine. The issue is that i want to increase its image transition speed like google photo app have. Can we do this programmetically ? I'm sharing few lines of code.
Start Activity
Intent intent = new Intent(StartActivity.this, TargetActivity.class);
intent.putExtra(KEY_EXTRA_IMAGES_URLS, urls);
ActivityOptionsCompat options = ActivityOptionsCompat.
makeSceneTransitionAnimation(StartActivity.this, view,
getResources().getString(R.string.transition_name_profile_image));
ActivityCompat.startActivity(StartActivity.this, intent, options.toBundle());
A shared element transition determines how a view that is shared between two fragments moves between them. For example, an image displayed in an ImageView in fragment A transitions to fragment B once B becomes visible.
Android also supports these shared elements transitions: changeBounds - Animates the changes in layout bounds of target views. changeClipBounds - Animates the changes in clip bounds of target views. changeTransform - Animates the changes in scale and rotation of target views.
You can change the transition time in your activity as:
getWindow().setSharedElementEnterTransition(new ChangeBounds().setDuration(2000));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With