I want to create a custom TimePicker with a 15-minute interval. I found a lot of resources around the Internet showing examples about custom TimePickerDialog.
I don't have any idea about how to implement a custom TimePicker. For the moment, I have this in my XML layout:
<TimePicker
android:id="@+id/timePicker"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
and I instantiate it in my Java this way:
tp = (TimePicker) findViewById(R.id.timePicker);
There are many questions I'm asking myself:
- What must I do to get a CustomTimePicker? Is extending Android's native TimePicker enough?
- What methods must be overridden to implement the 15-minute interval?
- If I manage to get my CustomTimePicker, how to declare it in my XML, since Android's parser won't understand a
<CustomTimePicker />
tag?
Thanks for your help!