When I click the back button to go back to previous activity, the transition slide still occur even though I have added overridePendingTransition. What is wrong with my code?
I want to disable all transition between the activities. There is no animation on transition when going to new activity but slide out when back button is pressed.
Activity act;
Intent intent = new Intent(act, newactivity.class);
intent.setFlags(65536);
act.startActivity(intent);
act.overridePendingTransition(0, 0);
You should call overridePendingTransition(0, 0);
in Activity's onPause()
:
public void onPause() {
super.onPause();
overridePendingTransition(0, 0);
}
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