7.2.2. Custom DialogFragments
Several previous apps have used AlertDialog
s in DialogFragment
s to display information to the user or to ask questions and receive responses from the user in the form of Button
clicks. The AlertDialog
s you’ve used so far were created using anonymous inner classes that extended DialogFragment
and displayed only text and buttons. AlertDialog
s may also contain custom View
s. In this app, you’ll define three subclasses of DialogFragment
:
• ColorDialogFragment
(Section 7.7) displays an AlertDialog
with a custom View
containing GUI components for previewing and selecting a new ARGB drawing color.
• LineWidthDialogFragment
(Section 7.8) displays an AlertDialog
with a custom View
containing GUI components for previewing and ...
Get Android™ How to Program, Second Edition 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.