Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
jhonatansabadi opened this issue · 1 comments
jhonatansabadi commented
I am using Kotlin... And tried to use in code, but the app does not init, it get error on the first activty.
SwitchDateTimeDialogFragment.newInstance(
"Escolha a data",
"CONFIRMAR",
"CANCELAR"
).apply {
startAtCalendarView()
set24HoursMode(true)
setMinimumDateTime(Date())
setDefaultDateTime(Date())
setOnButtonClickListener(
object : SwitchDateTimeDialogFragment.OnButtonClickListener {
override fun onPositiveButtonClick(date: Date?) {
date?.let {
toast(it.toDateString())
}
}
override fun onNegativeButtonClick(date: Date?) {
}
})
show(supportFragmentManager, "dialog_time")
}
J-Jamet commented
Version 2.1 should solve this problem as it now inherits the theme material.