Intent intent = null;
intent = new Intent(this, A.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NEW_TASK);
overridePendingTransition(R.anim.no_animation, R.anim.slide_down_out);
ClassSelector.this.finish();
startActivity(intent);
I need to have a transition from current page to another page that is A. i have added code 'intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NEW_TASK);' since this code is applied animation that is applied for A is nor working.
the two flags
Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_NEW_TASK
have opposite intention. One brings the old activity on top and the other creates a new task which could have results that cannot be predicted.
Intent.FLAG_ACTIVITY_SINGLE_TOP
which could bring the animation you need.
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