I am using this link Android TimePickerDialog set max time.
I am new in android. With the help of this code, I cannot select past time but we cannot select future time. When 12 is selected in timepickerdialog mode change to am automatically according to the next day not past day.
try this code:
it will show the
timepicker
dialog and if user select any time before current time... it will show invalid time..EDIT You need to import:
Here is a Good Example