That's is great,
Thanks.

On Tue, Jan 13, 2009 at 7:42 PM, Andrew Stadler <[email protected]> wrote:

>
> tmat-
>
> You might want to try this:
>  1.  Override your activity's onKeyDown() method.
>  2.  If the KeyEvent is KEYCODE_BACK, display your dialog
>  3.  If your dialog returns "YES", simply call Activity.finish()
>
> Remember that when you override onKeyDown(), you must return "true" if
> you handle the key locally, and false for all other keys/situations.
>
> --Andy
>
>
> On Fri, Jan 9, 2009 at 5:40 AM, tmat <[email protected]> wrote:
> >
> > Hi,
> >
> > How to display dialog YES/NO before user click back button ? If I show
> > some dialog in onPause() method it don't work based on Activity
> > Lifecycle so maybe there is another way to show some kind of dialog
> > after user press back ?
> >
> > Thanks
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to