Figure 106: showProgress method Launch it on an AVD, navigate to RelativeLayout page, click on the "Show Progress..." button, and watch the progress bar in action as shown in Figure 107. Figure 107: Progress Bar at work! and DatePicker TimePicker. the and They are the familiar faces on many web DatePicker TimePicker. applications that ask you for date and time information. Just (click) a date or pick time, free of typing and thus free of hassle of having to handle formatting issues in code. You will construct a new to explore them. Activity Create a new called "DateTimePickers", the Activity default as it is, but remove the default drag and RelativeLayout TextView. drop a and a from the to the screen (Figure DatePicker TimePicker Palette 108). Figure 108: The Picky Duo Open the "activity_date_time_pickers.xml", you see the XML code as shown in Figure 109. Note the attributes for android:onClick the and DatePicker TimePicker. Figure 109: activity_date_time_pickers.xml Open the "DateTimePickers.java" that hosts the "activity_date_time_pickers.xml", insert the highlight code as shown in Figure 110. The and methods will be invoked to echo the getDate getTime date or time selected on the screen whenever a user click on the respective controls.
Figure 106: showProgress method Launch it on an AVD, navigate to RelativeLayout page, click on the "Show Progress..." button, and watch the progress bar in action as shown in Figure 107. Figure 107: Progress Bar at work! DatePicker and TimePicker. the DatePicker and TimePicker. They are the familiar faces on many web applications that ask you for date and time information. Just pick (click) a date or time, free of typing and thus free of hassle of having to handle formatting issues in code. You will construct a new Activity to explore them. Create a new Activity called "DateTimePickers", the default RelativeLayout as it is, but remove the default TextView. drag and drop a DatePicker and a TimePicker from the Palette to the screen (Figure 108). Figure 108: The Picky Duo Open the "activity_date_time_pickers.xml", you see the XML code as shown in Figure 109. Note the android:onClick attributes for the DatePicker and TimePicker. Figure 109: activity_date_time_pickers.xml Open the "DateTimePickers.java" that hosts the "activity_date_time_pickers.xml", insert the highlight code as shown in Figure 110. The getDate and getTime methods will be invoked to echo the date or time selected on the screen whenever a user click on the respective controls.
Android%20UI%20and%20Controls%20New.docx