I have used
overridePendingTransition()already but it is used to open an activity with the given transition not an app.
Moreover it works only when you are having an intent on clicking on a button, it won't work if use overridePendingTransition() in onCreate()
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
Intent i = new Intent(Main2Activity.this,MainActivity.class);
startActivity(i);
overridePendingTransition(R.anim.slide_in_up,R.anim.slide_out_up);
}
before setContentView use following code :
and in your finish() use following code :
and create anim folder and put these files :
slide_in_from_bottom:
slide_out_back_to_bottom:
fade_in:
fade_out:
complete implementation can be found here.