Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the TimePickerDialog to 24 hour?

I know how to set the TimePicker widget to 24 hour, how do you do the same for the TimePickerDialog???

Otherwise will I have to make a new dialog box altogether??

like image 380
abhinav.mehra Avatar asked Feb 08 '12 11:02

abhinav.mehra


1 Answers

Basically there is a constructor parameter

public TimePickerDialog (Context context, TimePickerDialog.OnTimeSetListener callBack, int hourOfDay, int minute, boolean is24HourView)

and this link might also help you

TimePickerDialog and AM or PM


Cheers

like image 78
Sergey Benner Avatar answered Oct 30 '22 21:10

Sergey Benner