When I put a `TimePicker()` inside an `AlertDialog...
# compose-android
h
When I put a
TimePicker()
inside an
AlertDialog
as the docs indicate, in landscape mode, the time picker renders totally incorrectly. If I set
dialogProperties = DialogProperties(usePlatformDefaultWidth = false, decorFitsSystemWindows = false)
, visually things look correct on my device, but on a colleague's older device on Android 12 the notification bar overlaps the dialog's title, and if I make a really thin virtual device, my buttons at the bottom of the dialog can also get cut off. As much as I can understand from the
TimePicker
implementation, there are some hardcoded values for drawing the clock interface, so it has to take up a certain height. But on Google Calendar and the default Clock app, the time picker displays perfectly fine in a dialog in landscape mode. Does anybody know how to do this correctly?
t
I've had this issue as well . There also is an issue on the Google issue tracker that I think is relevant. Unfortunately this ticket has been open and inactive for quite some time now
h
Thank you for sharing this!