0

I am calling one activity from another using following code.

if(position==4) {
  Intent intent = new Intent();
  intent.setClass(tlActivity, Income.class);
  startActivity(intent);
  finish();
}

but when i am into the second activity which is called. i can not return to previous activity from which activity 2 was called. is there any way i could return to the first activity by pressing back button. i am using 2.2 SDK

thanks in advance

Quintin Robinson
  • 81,193
  • 14
  • 123
  • 132

1 Answers1

7

It's because you are calling finish(). Take that line out if you want to be able to return to it.

insertusernamehere
  • 23,204
  • 9
  • 87
  • 126
NSjonas
  • 10,693
  • 9
  • 66
  • 92