Created
May 3, 2017 13:03
-
-
Save smaugho/9227f8f59c6b91d06ad61a0573d55493 to your computer and use it in GitHub Desktop.
$DateDialog and $TimeDialog Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void selectDate() { | |
$DateDialog(); | |
int $year = 0, $month = 0, $day = 0; | |
String selectedDate = String.format(Locale.US, "Selected date is %02d-%02d-%02d", $year , $month+1, $day); | |
$Toast(selectedDate); | |
} | |
void selectTime() { | |
$TimeDialog(); | |
int $hour = 0, $minute = 0; | |
String selectdTime = String.format(Locale.US, "Selected time is %02d:%02d", $hour, $minute); | |
$Toast(selectedTime); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment