January 2014
Intermediate to advanced
736 pages
70h 43m
English
When the ColorDialogFragment is added to a parent Activity, method onAttach (Fig. 7.37, lines 88–96) is called. Line 92 gets a reference to the DoodleFragment. If that reference is not null, line 95 calls DoodleFragment’s setDialogOnScreen method to indicate that the Choose Color dialog is now displayed. When the ColorDialogFragment is removed from a parent Activity, method onDetach (lines 99–107) is called. Line 106 calls DoodleFragment’s setDialogOnScreen method to indicate that the Choose Color dialog is no longer on the screen.
87 // tell DoodleFragment that dialog is now displayed88 @Override89 public void onAttach(Activity activity) ...
Read now
Unlock full access