TimePicker

fun TimePicker(onTimeConfirm: (LocalTime) -> Unit, modifier: Modifier = Modifier, time: LocalTime = LocalTime.now(), showSeconds: Boolean = true)

A full screen TimePicker with hours, minutes and seconds.

This component is designed to take most/all of the screen and utilizes large fonts. In order to ensure that it will draw properly on smaller screens it does not take account of user font size overrides for MaterialTheme.typography.display3 which is used to display the main picker value.

Parameters

onTimeConfirm

the button event handler.

modifier

the modifiers for the Box containing the UI elements.

time

the initial value to seed the picker with.

showSeconds

flag to indicate whether to show seconds as well as hours and minutes. If true then the user will be able to select seconds as well as hours and minutes. If false then no seconds picker will be shown and the seconds will be set to 0 in the time returned in onTimeConfirm.