Multiple choice

Which of the following Statements are correct: A. Use onCreateView to set the view hierarchy for the dialog. B. Use onCreateDialog to create a completely custom dialog.

  1. Both A and B

  2. Only A

  3. Only B

  4. Neither A nor B

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Both statements are correct. By extending the  DialogFragment  class and implementing on onCreateView or onCreateDialog method, you can create the dialog. You can use onCreateView to set the view hierarchy for the dialog and onCreateDialog to create a completely custom dialog.