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
AlertDialog.Builder(TimeCard.this).setIcon(R.drawable.alert_dialog_icon).setTitle(
R.string.alert_dialog_msg).setPositiveButton(R.string.alert_dialog_ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int
whichButton) {
onHandleLogout();
}
}).setNegativeButton(R.string.alert_dialog_cancel, new
DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
/* User clicked Cancel so do some stuff */
}
}).create();
}
@Override
protected void onPause() {
showDialog(0);
super.onPause();
}
Any suggestions ?
On Sat, Jan 10, 2009 at 12:00 PM, tmat <[email protected]> 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 ideas how I can do this one ?
>
> 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
-~----------~----~----~----~------~----~------~--~---