Is it possible to popup a TimePicker when an EditText is clicked/touched?
I've tried looking for examples of this but I haven't found any. I want to use this time entered to set up an alarm, so it'd be great if someone could tell me how to do this and provide me of an example.
I'd prefer it if the Time was in 24 hour format instead of 12 hour format.
Thanks for any answers submitted.
This is the solution. I forgot about the true/false boolean and that's why it wasn't working when I tried something similar to the DatePicker code.
I will give you some tips to achieve that.
To show popup/dialog after EditText is clicked/touched you will find answer here: Android EditText onClickListener. Also is there discussed if popping dialog after clicking on EditText is standard/non-standard interface.
For TimePicker you can use system TimePickerDialog. You can find tutorial for TimePickerDialog here: http://www.pavanh.com/2013/04/android-timepicker-example.html
To use 24 hour format instead 12 hour format in TimePicker you can use following method:
timePicker.setIs24HourView(true)
, or if you use TimePickerDialog you will pas true in constructor.Hope it will help you.