Have you overridden onBackPressed in activity B in which case you should call
this.finish() in B. Your code should look similar to this
class A : Activity {
onClick(..) {
start activity B
}
}
class B : Activity {
onBackPressed() {
this.finish(); /* this takes you back to the previous activity on stack. You
need not do start activity to go to A as it will create new activity A and
launch it instead of closing B and going to previous A.*/
}
}
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.