Last active
December 10, 2019 15:22
-
-
Save magdamiu/9c68c60199c5abe52439e93afb13e8a4 to your computer and use it in GitHub Desktop.
TimePickerDialog example
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
hour = c.get(Calendar.HOUR_OF_DAY); | |
minute = c.get(Calendar.MINUTE); | |
TimePickerDialog timePickerDialog = new TimePickerDialog(this, | |
new TimePickerDialog.OnTimeSetListener() { | |
@Override | |
public void onTimeSet(TimePicker view, int hourOfDay, | |
int minute) { | |
textViewDateTime.setText(hourOfDay + ":" + minute); | |
} | |
}, hour, minute, false); | |
timePickerDialog.show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment