Are you saying when you press back from Activity A you are somehow going back to Activity B?
If so it sounds like you have multiple instances of Activity B already on the stack, when starting Activity B you can add the intent flag Intent.FLAG_ACTIVITY_CLEAR_TOP to make sure you only ever have one instance: Intent intent = new Intent(this, ActivityB.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent); I'm not sure I fully understand your situation so please feel free to provide more details if this is along the wrong lines. Regards, Richard On 20 Oct 2010, at 12:07, Donald wrote: > hi guys, > > Assume i have two activities Activity A and B > > Activity B will display a list > > which will display a 25 result list. this also contains a pagination > logic. if user select next it will display the next 25 result list. > > so assume that user is in the third page. from the third page if user > selects back i want display Activity A. which i have already done. > > but when i click back button from Activity A i want to exit the > application so once i press the back button from Activity A i use > finish() > > but Application will not exit. > > rather it displays the 1,2 list results then only application will > exit. > > i want to achieve this with out setting the noHistory attribute in > manifest. > > ragards, > > Mike > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > 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 post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en