Questions tagged [android-timepicker]

A view for selecting the time of day, in either 24 hour or AM/PM mode, in Android applications.

A view for selecting the time of day, in either 24 hour or AM/PM mode. The hour, each minute digit, and AM/PM (if applicable) can be conrolled by vertical spinners. The hour can be entered by keyboard input. Entering in two digit hours can be accomplished by hitting two digits within a timeout of about a second (e.g. '1' then '2' to select 12). The minutes can be entered by entering single digits. Under AM/PM mode, the user can hit 'a', 'A", 'p' or 'P' to pick.

Useful links

370 questions
122
votes
10 answers

TimePicker Dialog from clicking EditText

I've already got a DatePicker which pops up when the user clicks on the EditText field eReminderDate.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated…
Mark O'Sullivan
  • 10,138
  • 6
  • 39
  • 60
74
votes
10 answers

How to change the style of a DatePicker in android?

I want to change the default color of the date/time picker dialog in Android, so that it should match my app's theme. I searched for the solution on Google, but I couldn't find a solution. What I was doing was creating a new style:
57
votes
11 answers

Show TimePicker with minutes intervals in android

My application show a TimePickerDialog to set a time. I want that the timePickerDialog show the minutes with an interval of 5 minutes. This works fine with this code: private final int TIME_PICKER_INTERVAL=5; private boolean mIgnoreEvent=false; … …
Sergio76
  • 3,835
  • 16
  • 61
  • 88
27
votes
9 answers

Casting and getting values from date picker and time picker in android

I have a DatePicker and a TimePicker in my app. Can anyone tell me how to get the values of the date and time that are selected??? What i mean to say is, for EditText we can declare as final EditText name = (EditText)…
Rahul Kalidindi
  • 4,666
  • 14
  • 56
  • 92
27
votes
5 answers

How do I set AM/PM in a TimePicker?

I am using a TimePicker in my app. Whenever the user opens the screen with the TimePicker, I initialize it with the current time. When I do this, the TimePicker shows AM instead of PM. Why does this happen? Is there anything I have to add in my…
AndroidDev
  • 4,521
  • 24
  • 78
  • 126
20
votes
5 answers

Is it possible to change the style of an Android L TimePickerDialog?

I was testing my app on an Android L emulator, and I noticed that the TimePickerDialog has significantly changed to this: This doesn't fit with the theme of my app, and I wanted to know if it is possible to get the old TimePickerDialog style when…
JDJ
  • 4,298
  • 3
  • 25
  • 44
18
votes
7 answers

Android: Setting time in time picker with the time shown in text view

In my app, I am showing time in text view as 07:00 PM. On click of the text view, a time picker dialog pops up, In that time picker, I have to show exactly the same time as what is appearing in textview. But, I am not getting how to do that. CODE…
Nitish
  • 3,097
  • 13
  • 45
  • 80
16
votes
3 answers

Android TimePickerDialog styling guide/docs?

I'm trying to style a TimePickerDialog for sdk 21+ (Lollipop). So far I've figured out how to change the default colorscheme in XML: