March 2013
Beginner to intermediate
580 pages
16h 11m
English
Dialogs demand attention and input from the user. They are useful for presenting a choice or important information. In this chapter, you will add a dialog in which users can change the date of a crime. Pressing the date button in CrimeFragment will present this dialog (Figure 12.1).
Figure 12.1 A dialog for picking the date of a crime

The dialog in Figure 12.1 is an instance of AlertDialog, a subclass of Dialog. AlertDialog is the all-purpose Dialog subclass that you will use most often.
(There is a DatePickerDialog subclass of AlertDialog that sounds perfect for what you are doing. However, as of this writing DatePickerDialog has some ...
Read now
Unlock full access