Interview Questions

The following questions should help you solidify your understanding of this chapter's discussion of dialogs:

  1. Can your code read the user's input from a prompt dialog fragment right after the dialog fragment has been shown? Why or why not?
  2. Which method of DialogFragment do you use to build a view hierarchy?
  3. Which method do you use to return a ready-to-go dialog?
  4. What method of a dialog fragment do you use to display the dialog?
  5. What are the two ways this method can be called? Which one is the simplest to call?
  6. Can you use onDismiss() to tell you when the user has clicked a button in a dialog fragment? Why or why not?
  7. Can a dialog fragment show another dialog fragment? If so, could the new dialog fragment display yet another ...

Get Pro Android 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.