Skip to content

Timepicker clipping with large system font sizes #165

@Jahor

Description

@Jahor

Describe the bug
When Large font sizes selected in the system settings Hour/Minute labels become clipped in timepicker.
Large font size on emulator (Pixel 5 API 31) is not enough to cause the problem, but on Samsung phone (Android 10) you can choose larger font size, which causes clipping.
Buttons are clipped as well.

To Reproduce
Steps to reproduce the behaviour (including any applicable code):

  1. Go to Android Settings -> Display -> Font size and style
  2. Select largest font
  3. Open timepicker dialog in demo app
  4. See error

Expected behaviour
Text Should not clip

Screenshots
Screenshot_20221011-112435_compose-material-dialogs

Device:

  • Name: Samsung Galaxy A21
  • Android Version: Android 10

Suggestion
May be it is possible to just set text size of H/M/: labels in Dp instead - field is large enough that it is bigger than the biggest font size selectable, so should not be a problem from accessibility point of view. 60-65.dp seem to work well (at least on non-small devices)
For Buttons - the opposite - set defaultButtonHeight in MaterialDialogScope.DialogButtonsLayout to 36.sp rather than 36.dp.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions