Did you Know

A toast is a view that pops up in the foreground to display a message for a few seconds and then disappears.

For example, you could add a Toast message to the onClick() method of the Button_DOB, like this:

Toast.makeText(QuizSettingsActivity.this, "TODO: Launch DatePickerDialog", Toast.LENGTH_LONG).show();

Figure 10.6 shows the resulting Toast message.

The Spinner control is basically the Android platform's version of a drop-down list. The control looks much like a drop-down when closed (see Figure 10.7, left), but when the Spinner control is activated, it displays a chooser window (see Figure 10.7, right) instead of drawing the drop-down on the main screen.

FIGURE 10.6

A Toast message triggered by a button r

8:33 PM

click.

8:33 PM

0 0

Post a comment