currently I"m using public void overridePendingTransition (int enterAnim, int exitAnim) to acheive this goal. I’ve discovered that I dont have to rely on animations created instead I can use some android animations as below.
fadein = AnimationUtils.loadAnimation(BerlinWallActivity.this, android.R.anim.fade_in);
fadeout =AnimationUtils.loadAnimation(BerlinWallActivity.this, android.R.anim.fade_out);
but my problem is overidePendingTransition doesn’t take Animation as parameters:( it fails pathetically. How can I reuse fadein, fadeout animation variables to acheive the same goal??
Thanks for your time in advance.
The method
overridePendingTransition()takes two resource IDs as parameters, not twoAnimationobjects. You just have to put in the raw resource IDs in the function call, likeR.anim.fade_in.