5.6 MainActivity
Class
This app consists of six classes:
MainActivity
(discussed below)—This is the parentActivity
for the app’sFragments
.MainActivityFragment
(Section 5.7)—Manages theDoodleView
and accelerometer event handling.DoodleView
(Section 5.8)—Provides the drawing, saving and printing capabilities.ColorDialogFragment
(Section 5.9)—ADialogFragment
that’s displayed when the user chooses the option to set the drawing color.LineWidthDialogFragment
(Section 5.10)—ADialogFragment
that’s displayed when the user chooses the option to set the line width.EraseImageDialogFragment
(Section 5.11)—ADialogFragment
that’s displayed when the user chooses the option to erase, or shakes the device to erase, the current drawing.
Class MainActivity ...
Get Android How to Program, 3/e 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.