make sure month fragment clickable background is properly added

This commit is contained in:
tibbi 2018-03-28 14:02:54 +02:00
parent 2ad7b679a7
commit 7ee682f32a

View File

@ -34,6 +34,7 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
onGlobalLayout {
if (!wereViewsAdded && days.isNotEmpty()) {
measureSizes()
addViews()
monthView.updateDays(days)
}
@ -45,7 +46,9 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
measureSizes()
dayClickCallback = callback
days = newDays
addViews()
if (dayWidth != 0f && dayHeight != 0f) {
addViews()
}
monthView.updateDays(days)
}