mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-29 21:05:19 +08:00
1.7 KiB
1.7 KiB
Time Pickers
Time Pickers allow users to select a single time.
Design
Customization
A time picker can be instantiated by MaterialTimePicker.Builder.
The builder allows you to do the following:
- Set the Time Format, 24 Hour clock or 12 Hour clock. Defaults to 12 Hour.
- Set the starting time. Defaults to 12:00 am
- Set the input mode to Keyboard or Clock. Defaults to Clock.
Examples of these customizations can be seen in the Time Picker Demo.
Demo
You can see the current version of the Time Picker Demo in the Material Android Catalog. The demo lets you choose between the different formats.
Code
The TimePicker Package contains the code for this component, with the main entry point being MaterialTimePicker.