Android TimePicker Dialog

Android TimePicker:

In this session we will learn to use TimePicker.

Create new project in eclipse (Android-First-Programm).

In res -> layout open “activity_main.xml” and use button.

activity_main.xml

In MainActivity.java get button reference and using Calendar class assign current time to Button.

 

MainActivity.java