0% found this document useful (0 votes)
14 views16 pages

Android Clock & Date Picker App Coding

This document covers coding for Android apps, specifically focusing on creating analog and digital clock applications, as well as date and time picker widgets. It explains the use of deprecated classes and provides examples of XML layouts and outputs for these functionalities. The document concludes with a mention of the next session topics, including Google Maps and popup menus.

Uploaded by

denismaina2001
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views16 pages

Android Clock & Date Picker App Coding

This document covers coding for Android apps, specifically focusing on creating analog and digital clock applications, as well as date and time picker widgets. It explains the use of deprecated classes and provides examples of XML layouts and outputs for these functionalities. The document concludes with a mention of the next session topics, including Google Maps and popup menus.

Uploaded by

denismaina2001
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lesson 8

Android Apps Coding – Part 1

Abdulrahman Ahmed
PhD IT(Currently), MSc. IT, MSc. CS & BSc. IT
CONTENT
 Analog & Digital Clock App Coding
 Date Picker App Coding
1. Analog & Digital Clock App Coding
Exercise 1.1
 Android Analog clock and Digital clock
 The [Link] and
[Link] classes provides the functionality
to display analog and digital clocks.
 Android analog and digital clocks are used to show time in
android application.
 Android AnalogClock is the subclass of View class.
 Android DigitalClock is the subclass of TextView class.
 Since Android API level 17, it is deprecated. You are
recommended to use TextClock Instead.
 The AnalogClock was deprecated in API level 23. This widget is
no longer supported.
 Instead if you want to use AnalogClock in your application you
need to hard code.
 It does not appear in API level 27 to drag from palette.
Exercise 1.1
 Android Analog clock and Digital clock
 In android, you need to drag analog and digital clocks from the pallet to
display analog and digital clocks.
 Now, drag the analog and digital clocks, now the xml file will look like this.
 1. Activity_main.xml
Exercise 1.1
 Android Analog clock and Digital clock
 2. Activity Class
Exercise 1.1
 Android Analog clock and Digital clock
 3. Output
Exercise 1.2

 Android TimePicker
 Android TimePicker widget is
used to select date.
 It allows you to select time by
hour and minute.
 You cannot select time by
seconds.
 The [Link]
is the subclass of FrameLayout
class.
Exercise 1.2

 Android TimePicker
 Let's see a simple example of android time picker.
 1. Activity_main.xml
Exercise 1.2

 Android TimePicker
 Let's see a simple example of android time picker.
 3. Output
2. Date Picker App Coding
Exercise 2

 Android DatePicker
 Android DatePicker is a widget to
select date.
 It allows you to select date by day,
month and year.
 Like DatePicker, android also provides
TimePicker to select time.
 The [Link] is the
subclass of FrameLayout class..
Exercise 2
 Android DatePicker
 Let's see the simple example of datepicker widget in android.
 1. Activity_main.xml
Exercise 2
 Android DatePicker
 Let's see the simple example of datepicker widget in android.
 2. Activity class
Exercise 2
 Android DatePicker
 Let's see the simple example of datepicker widget in android.
 3. Output
Next Session
 Android Apps Coding – Part 2
 Android Google Map
 Android Popup Menu
The End
Any Questions?

You might also like