Thanks for your responses!

The problem is not to set the message of the dialog, but how to pass
my customized message string to onCreateDialog or onPrepareDialog.
Both functions only have a single int parameter (dialog id). When
calling showDialog(..), I just can send a single dialog id, and not
more parameters such as a customized message string.

For example, consider an alert dialog that shows the number of files
in a folder. The message could be "Number of files: 15" or "Number of
files: 21". How can I pass this message string over to onCreateDialog
or onPrepareDialog? With API level 8, showDialog is extended by a
Bundle parameter, which could be uses to pass such information.

A solution would be to store my message string in a member variable of
the activity before calling showDialog, and reading that member
variable in onCreateDialog/onPrepareDialog. But this could cause
problems when calling showDialog multipe times, because onCreateDialog/
onPrepareDialog are called asynchronously.

Sorry if I didn't make the problem clear in my first message. Any more
hints?

Thanks,
Andreas

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