5.10 LineWidthDialogFragment Class

Class LineWidthDialogFragment (Fig. 5.48) extends DialogFragment to create an AlertDialog for setting the line width. The class is similar to class ColorDialogFragment, so we discuss only the key differences here. The class’s only instance variable is an ImageView (line 21) in which we draw a line showing the current line-width setting.

Fig. 5.48 Class LineWidthDialogFragment

Computer code has 117 lines.

Fig. 5.48 Class LineWidthDialogFragment

Code continues.

Fig. 5.48 Class LineWidthDialogFragment ...

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.