This should be a simple task, but for some reason I can find a way to set the title of a DialogFragment. (I am setting the dialog contents using onCreateView
overload).
The default style leaves a place for the title, but I can't find any method on the DialogFragment
class to set it.
The title is somehow magically set when the onCreateDialog
method is used to set the contents, so I wonder if this is by design, or there is a special trick to set it when using the onCreateView
overload.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…