Ahh ok, thanks guys, works great..
On Aug 22, 7:39 pm, Randy McEoin <[EMAIL PROTECTED]> wrote:
> What follows is how I did it. The part that was not obvious from the
> sample code was the need for show(). Note that you can skip the
> setIcon() and it'll use a default one. And you can skip the
> setPositiveButton(), but then the user needs to hit the back button to
> clear the dialog. showAlert() was nice, but AlertDialog is much more
> versatile.
>
> public boolean onOptionsItemSelected(MenuItem item){
> switch (item.getItemId()) {
> case 0:
> Dialog about = new AlertDialog.Builder(CIDRCalculator.this)
> .setIcon(R.drawable.icon)
> .setTitle(R.string.about_dialog_title)
> .setPositiveButton(R.string.about_dialog_ok, null)
> .setMessage("CIDR Calc\nCopyright 2008\nRandy McEoin")
> .create();
> about.show();
> return true;
> }
> return false;
> }
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new Android 0.9 SDK beta!
http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---