I want to add a transition transition to the next step.
So I did:
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS); window.setEnterTransition(new Slide());
This does not work. After doing trial and error (since I had this transition working on other actions), I found out that it worked after the call
ActivityOptionsCompat activityOptionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, view, "some_name"); ActivityCompat.startActivity(activity, new Intent(TourAndLoginActivity.this, LoginActivity.class), activityOptionsCompat.toBundle());
But I do not have a common element (I added a view to check it). Cannot add 'null' as a generic element.
Is this really necessary for this? My workaround would be to add an invisible common element.
source share