BasicMonthPanelBehavior
class BasicMonthPanelBehavior(background: Paint, defaultVisualizer: ItemVisualizer<LocalDate, MonthPanel> = itemVisualizer { day, previous, panel ->
val text = "${day.dayOfMonth}"
when (previous) {
is Label -> previous.apply { fitText = emptySet(); this.text = text }
else -> Label(text).apply { fitText = emptySet() }
}.also {
it.enabled = day.month == panel.startDate.month
}
}) : MonthPanelBehavior(source)
Created by Nicholas Eddy on 2/21/22.
Constructors
Link copied to clipboard
constructor(background: Paint, defaultVisualizer: ItemVisualizer<LocalDate, MonthPanel> = itemVisualizer { day, previous, panel ->
val text = "${day.dayOfMonth}"
when (previous) {
is Label -> previous.apply { fitText = emptySet(); this.text = text }
else -> Label(text).apply { fitText = emptySet() }
}.also {
it.enabled = day.month == panel.startDate.month
}
})