Hi Aquinas, I know it is over a month late, but just in case anyone else comes and looks for this as I did. I was having a similar issue in that I could not update my entire custom dialog, this is the result of the activity "caching" the dialog. After reading the API a bit closer I found this:
"If you use showDialog(int), the activity will call through to this method the first time, and hang onto it thereafter." in regards to the Dialog class In order ensure onCreateDialog() is called each time, instead of dismissing the dialog, call removeDialog(). I hope this helps, Kevin On Sep 27, 9:24 pm, aquinas <[EMAIL PROTECTED]> wrote: > Thanks. I was able to solve this by overriding > Activity.onPrepareDialog(). > > On Sep 27, 10:07 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: > > > aquinas wrote: > > > Hello, > > > I am trying to make adialogwith 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 > > >dialogthe first time it displays, but if I change the class-level > > > string and show thedialogagain, the title does not get updated. I > > > imagine that thedialogis cached somewhere, and I need toflushit 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 theonCreateDialog() documentation: > > > "If you would like an opportunity to prepare yourdialogbefore it is > > shown, override onPrepareDialog(int,Dialog)." > > > That's assuming, of course, that you're usingonCreateDialog() -- 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 android-developers@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---