Open arekolek opened 1 year ago
Theme.MaterialComponents.DayNight.NoActionBar
suffers the same issue when it comes to days of week:
At least it doesn't have the problem with days of month.
Should I report a separate issue for M2, or can this issue be used to track both?
When your app is overriding this base context to set defaults, MaterialDatePicker
is not even showing.
Material Library version: 1.10.0, 1.11.0.
override fun attachBaseContext(newBase: Context) { newBase.resources?.configuration?.setToDefaults() super.attachBaseContext(newBase) }
Description:
Using a default new project in Android Studio that uses
Theme.Material3.DayNight.NoActionBar
when you show aMaterialDatePicker
and set full screen zoom (320dp width) and 200% font size in system setting, the dialog does not pass WCAG guildelines and Google's own guidelines https://support.google.com/accessibility/android/answer/12159181 "parts of the text to become cropped, cut, or obscured".You can see on the screenshot that days of week are cut, and days of month are cropped - only the first digit is visible, making the date picker unusable.
Expected behavior:
Follow recommendation from linked guidelines:
For example
DatePickerDialog
from Android SDK handles this correctly:Source code:
Minimal sample app repro: DateTimePicker.zip
Android API version: API 34
Material Library version: 1.10.0
I'm using the latest version of the
com.google.android.material:material
library.Device: Pixel 7 Pro emulator