How to set the title of DialogFragment?
问题 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. 回答1: You