Probably you are using overridePendingTransition(anim, anim)
in your onPause()
method too.
I had the same problem but I solve it by a tiny trick.
1: Define a boolean in your class
before onCreate()
method
private boolean pendingTransaction = true;
@Override
protected void onCreate(Bundle savedInstanceState) {...
2: Set pendingTransaction
to false
when you you use startActivity();
Intent newsIntent = newIntent(ZPFActivity.this,More2013Activity.class);
pendingTransaction = false;
startActivity(newsIntent);
overridePendingTransition(R.anim.slide_no_move, R.anim.fade);
3: Override the onPause()
method by doing this.
@Override
protected void onPause() {
if (pendingTransaction) {
overridePendingTransition(R.anim.slide_no_move, R.anim.fade);
}
super.onPause();
}
4: Override the onResume()
method by doing this.
@Override
protected void onResume() {
super.onResume();
pendingTransaction = true;
}