[MaterialTimePicker] Fix the dialog buttons getting clipped at the bottom
The "Cancel" and "Ok" buttons in the dialog are being clipped at the bottom
when the theme's minTouchTargetSize is not the default 48dp.
This is because those two buttons are constrained only to the top of
the "input mode" button and have no bottom constraint. The "input mode"
button is the only one constrained to parent on the bottom edge, which
means that if this button gets smaller than those other two buttons - like
when the minTouchTargetSize is 0dp - the bottom edge of the dialog
will move up, but because those other two buttons are only constrained
at the top edge, they stay in place and get clipped.
So this adds a bottom constraint to the "Cancel" and "Ok" buttons, which
fixes the clipping issue. I've also changed the end margin from 8dp to
12dp to match the start margin of the "input mode" button, but I'm not
too sure about that one, it just seemed nicer to have equal margins on both
sides of the dialog.
closes #3584
Here are the screenshots with minTouchTargetSize set to 0dp:
| Before | After |
|---|---|
| Before with layout bounds | After with layout bounds |
Ping.
Curious if this fix is onna get reviewed again? It seems that it has been two years and I was actually gonna open a PR myself to fix this as I encountered the issue in an Android app I use, but looks like this could have been included in a release already?