aquinas wrote:
> Hello,
>   I am trying to make a dialog with a dynamic title. I am using the
> AlertDialog.Builder approach, with a layout that I have inflated from
> XML. I setting the title using AlertDialog.Builder.setTitle(), passing
> a class-level string to this method. I am able to set the title of the
> dialog the first time it displays, but if I change the class-level
> string and show the dialog again, the title does not get updated. I
> imagine that the dialog is cached somewhere, and I need to flush it or
> mark it as dirty in order for the title to update the next time it
> displays. How do I do this? Thanks,

Quoting from the onCreateDialog() documentation:

"If you would like an opportunity to prepare your dialog before it is
shown, override onPrepareDialog(int, Dialog)."

That's assuming, of course, that you're using onCreateDialog() -- I'm 
not aware of other means by which Android would cache dialogs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.2 Published!

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