I am using overridePendingTransition to make a transition from MainActivity to a Sub-Activity. The transition moves MainActivty out on the right, and the Sub-Activity into the screen from the left.
I need that the transition is triggered by pressing a button and not started by back pressed.
overridePendingTransition(R.anim.slide_in_left,R.anim.slide_out_right);
After change to overrideActivityTransition above transition doesn't work for Android >=34.
overrideActivityTransition(OVERRIDE_TRANSITION_OPEN,R.anim.slide_in_left,R.anim.slide_out_right);
How can i restore the behaviour under Android 34?
Thanks GGK
The
overrideActivityTransitionisn't fully compatible with the previousoverridePendingTransitionmethod.You should call the
overrideActivityTransitioninside yourSub-Activity'sonCreate()method:For further explanation, look at the documentation: https://developer.android.com/about/versions/14/features/predictive-back#custom-activity