Material Design duration picker for Android
How to
- Let an activity implement the interface
DurationPickerFragment.Listener - Specify what metric should be shown with
DurationPickerFragment.setMetrics() - Define the
onDurationPickerResult()method to use the result - Rock and Roll!
Friendly reminder
Be aware that the duration picker does not understand what metrics are used and the result must therefore be converted manually e.g. one minute and 90 seconds equals two minutes and 30 seconds when selected by a picker utilizing hours, minutes and seconds as metrics.
