我正在尝试在我的软件中实现Caldroid。要检查用户是否单击了任何东西,我正在设置一个侦听器,如下所示:
val listener = object : CaldroidListener() {
fun onSelectDate(date: Date, view: View) {
Toast.makeText(
applicationContext, formatter.format(date),
Toast.LENGTH_SHORT
).show()
}
override fun onChangeMonth(month: Int, year: Int) {
val text = "month: $month year: $year"
Toast.makeText(
applicationContext, text,
Toast.LENGTH_SHORT
).show()
}
fun onLongClickDate(date: Date, view: View) {
Toast.makeText(
applicationContext,
"Long click " + formatter.format(date),
Toast.LENGTH_SHORT
).show()
}
override fun onCaldroidViewCreated() {
Toast.makeText(
applicationContext,
"Caldroid view is created",
Toast.LENGTH_SHORT
).show()
}
}
但是:Android在“对象”标签上显示了一个错误,说:“对象不是抽象的,并且没有实现抽象基类成员public abstract fun onSelectDate(date:Date !, view:View!):Unit com.roomorama.caldroid.Caldroidlistener'
中定义有人知道如何处理吗?