Take the 2-minute tour ×



onCreate() {
startActivity(new Intent(this, NextActivity.class));


share|improve this question
When I call finish() after startActivity there's some visual quirkiness. I'd love to know why calling startActivity first works better...which it does. Anyone? –  ZaBlanc Jan 30 at 21:55
add comment

1 Answer

up vote 16 down vote accepted

Probably you should just use the noHistory flag on the activity in your manifest.xml

share|improve this answer
Thanks! that accomplishes exactly what I wanted to do. I'm still interested, however, in hearing if there is anything inherently wrong or bad form in my previously described approach, and if my understanding of how messages are handled in the queue is correct. –  stormin986 Apr 26 '10 at 1:04
Your code (start and then finish) is absolutely correct, and a technique that is often used. –  hackbod Apr 26 '10 at 3:55
Thanks hackbod and jqpubliq! –  stormin986 Apr 26 '10 at 3:59
@hackbod: Could you please point to the documentation? Just in case someone needs it (like me)... –  user942821 Feb 25 '12 at 19:41
What if Activity A has nohistory=true and is first send to the background (i.e. User pressed the Home button) and then brought back to the foreground - would the state of Activity A have been preserved despite the noHistory=true? –  Zainodis Apr 4 '12 at 6:37
add comment

Your Answer


