material-components-android: MaterialDatePicker OK button is not fully visible (3 dots)

This 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 85e24d84-ab07-44ea-a83f-576edfa8f8a9

Expected behavior: Pixel 3: IMAGE 2020-05-29 20:04:36

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

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 25 (7 by maintainers)

Commits related to this issue

Most upvoted 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?