MaterialDatePicker OK button is not fully visible (3 dots)
See original GitHub issueThis BUG appears only on the specific devices, the “OK” button is not fully visible, and it displays as a “3 dots”.
Current behavior: Nokia 7 Plus
Expected behavior: Pixel 3:
Source code: Extension function:
fun AppCompatActivity.datePicker(
titleId: Int? = null,
minusYears: Int = 0,
minusDay: Int = 0,
startDate: Long? = null,
datePattern: String = DMY,
dateChosen: (String, Long) -> Unit
) {
val endDate = LocalDate().minusYears(minusYears).minusDays(minusDay)
MaterialDatePicker.Builder.datePicker().apply {
titleId?.let { setTitleText(it) }
setCalendarConstraints(CalendarConstraints.Builder().apply {
startDate?.let { setStart(it) }
setEnd(endDate.toDate().time)
}.build())
}.build().run {
addOnPositiveButtonClickListener {
dateChosen.invoke(DateTime(it).toLocalDate().toString(datePattern), it)
}
show(supportFragmentManager, toString())
}
}
On the place of call:
datePicker(
R.string.some_str,
PAST_18_YEARS,
PAST_1_DAY
) { date, timestamp ->
espUser.birthDate = timestamp.mlsToSeconds()
}
Android API version: - 29
Material Library version: 1.2.0-alpha06
Device: : Nokia 7 Plus
Issue Analytics
- State:
- Created 3 years ago
- Comments:25 (7 by maintainers)
Top Results From Across the Web
"OK" button not showing properly in MaterialDatePicker
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >Material datepicker dialog in android studio | Date picker
In this video we are going to learn how to create material date picker in android studioIf you have any questions or queries...
Read more >DatePicker OK/Cancel buttons not visible on Android
I added DatePicker in my app. However, when I tested it, I found that on Android the calendar's OK/Cancel buttons were colored white...
Read more >B4A Library AppCompat - Make Material Design apps ... - B4X
The ACActionMenu is a complete View you can add to your layout. It can have action items like an ActionBar or just the...
Read more >Visual Feedback: Dialogs, Snackbars and Toasts
Providing visual feedback to the user is very important. In this tutorial, you'll learn about ... Underneath the cards are three buttons.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, I just want to update this thread, we’ve fixed this bug by overriding the string resource used by material design.
just put this in your string xml <“string name=“mtrl_picker_confirm” description=“Button text to indicate that the widget will save the user’s selection [CHAR_LIMIT=16]”>OKAY</string”>
by the way, we’re using, 1.4.0-alpha02 version.
note: remove the (“” double quote) inside “<”
Team is there any Update regarding this issue?