Maybe an audible cue that they are about to navigate back out? But, as others have said, that navigation should have no bad consequences, so the user need not be aware of it.
While a "home" navigation in the option menu is not desirable, that would be one way to enable your users to return to the "top" of your application. Give this "anchor" activity a meaningful name and give the user a menu item so they can get to it from anywhere, if your users really need that. This article http://developer.android.com/guide/practices/ui_guidelines/activity_task_design.html covers how navigation should work. On Apr 27, 3:43 am, Xiongzh <[email protected]> wrote: > Yes, I have keep in back stack what should in the back stack. > But sometimes customers just want to navigate to the activity in the > bottom of the stack, i.e, the first view the see, the main view I > assume. They are not intent to leave my application. > > That's why they ask for a confirmation when they leave by back button. > > On Apr 27, 3:31 pm, patbenatar <[email protected]> wrote: > > > > > > > Wait I'm a bit confused... If the user wants to hit the back button to > > go back to the previous Activity, I'm assuming you're talking about a > > previous Activity within your app? This functionality is native to > > Android and should be maintained throughout your app. If you start an > > activity for result and then finish it, it will be removed from your > > back stack. If your users complain that the back button does not act > > natively [going back to the previous Activity], maybe rethink how you > > pass of from Activity to Activity throughout your app. If this page > > the user wants to return to is important enough for your users to > > complain about their inability to return to it, you should keep it in > > the back stack so they can return to it. > > > Sorry if this is a misunderstanding of your message. > > > -Nick > > > On Apr 27, 12:22 am, Xiongzh <[email protected]> wrote: > > > > Some of my customers are accustomed to use the back button to go back > > > to the previous activity. Some complained that they often navigate out > > > of the application by pressing back button. I think it would be nice > > > to customers if they can be warned. > > > > Thanks for your suggestion. > > > > How do think the approach I used? > > > > On Apr 27, 2:43 pm, Nicholas Albion <[email protected]> wrote: > > > > > My first thought was to suggest that you rethink if you really need to > > > > do this - maybe your app isn't going to be as important to your users > > > > as you may think. > > > > > But then, I been frustrated in the past by games which exit in the > > > > middle of the game if you press too far right... > > > > > Maybe you should provide an option (which you'd only ever ask once): > > > > "Always confirm before exiting" > > > > > > I can find some posts on how to warn user when the back button is > > > > > pressed to 'quit' the application. > > > > > > The common answer is to catch the key down event by onKeyDown, or use > > > > > startActivityForResult(). > > > > > > My approach is to restart the activity in onStop(). > > > > > Is it a better choice? > > > > > > Please help to check if there's anything inappropriate. > > > > > -- > > > > 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 > > > > athttp://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 [email protected] > > > To unsubscribe from this group, send email to > > > [email protected] > > > For more options, visit this group > > > athttp://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 [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group > > athttp://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 [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group > athttp://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 [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

