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
No idea at all ??
I've tried to put dialog initialization into onPause() method but obviously
it doesn't work based on Activity Lifecycle so this doesn't work:
@Override
protected Dialog onCreateDialog(int id) {
return new
Implement onKeyDown to handle the BACK key yourself.
On Sun, Jan 11, 2009 at 6:36 AM, tmat tomasz.matyszew...@gmail.com wrote:
Hi,
I'd like to control when user click back button and show him some YES/
NO dialog after that. Depends what he select I will close activity or
leave one. Any
3 matches
Mail list logo