0

Update:

I figured out that the reason was that the @Override method itself was misconstrued. Although this is a duplicate question the answer is still available for StackOverflow members to use.

In your activity you must declare the @Override as follows:

@Override
public void onBackPressed() {
    overridePendingTransition(R.anim.disappear, R.anim.appear);
    finish();
    super.onBackPressed();

Hope that clears up any discrepancy.

Google
  • 80
  • 13
  • What button are you referring to? Are you referring to the Android hardware back button or the back button in the title bar specific to your app? – bwegs Mar 25 '15 at 17:33
  • Did you also override the onBackPressed() method in `Activity2`? – bwegs Mar 25 '15 at 17:42
  • **possible duplicate request mod deletion** – Google Mar 25 '15 at 17:42
  • @Goooooogle: Don't delete question bodies. Duplicates help to find original questions if they are present and have slightly different wording. – Basilevs Mar 25 '15 at 17:46
  • @Goooooogle: [Read on duplicates](http://stackoverflow.com/help/duplicates) – Basilevs Mar 25 '15 at 17:51

0 Answers0