I want to add an enter transition to the next activity.
So I did:
getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS);
window.setEnterTransition(new Slide());
This doesn't seem to work. After doing some trial and error (as I had this transition working on other activities) I found out that it did work after calling
ActivityOptionsCompat activityOptionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, view, "some_name");
ActivityCompat.startActivity(activity, new Intent(TourAndLoginActivity.this, LoginActivity.class), activityOptionsCompat.toBundle());
But I have no shared element (I added a view just to test it). It is not possible to add 'null' as shared element.
Is it really mandatory to do it this way? My workaround would be to add an invisible shared element.