Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timepicker clipping with large system font sizes #165

Open
Jahor opened this issue Oct 10, 2022 · 0 comments · May be fixed by #169
Open

Timepicker clipping with large system font sizes #165

Jahor opened this issue Oct 10, 2022 · 0 comments · May be fixed by #169
Assignees
Labels
bug Something isn't working

Comments

@Jahor
Copy link
Contributor

Jahor commented Oct 10, 2022

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.

@Jahor Jahor added the bug Something isn't working label Oct 10, 2022
@PranavMaganti PranavMaganti linked a pull request Dec 18, 2022 that will close this issue
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants