Methods getDoodleView and setDialogOnScreen
Methods getDoodleView
and setDialogOnScreen
(Fig. 7.19) are called by methods of the app’s DialogFragment
subclasses. Method getDoodleView
returns a reference to this Fragment
’s DoodleView
so that a DialogFragment
can set the drawing color, set the line width or clear the image. Method setDialogOnScreen
is called by Fragment
lifecycle methods of the app’s DialogFragment
subclasses to indicate when a dialog is on the screen.
182 // returns the DoodleView183 public DoodleView getDoodleView()184 {185 return doodleView;186 }187 188 // indicates whether a dialog is displayed189 public void setDialogOnScreen(boolean visible)190 {191 ...
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.