fix a glitch at month view screen with updating day height

This commit is contained in:
tibbi 2018-03-28 14:43:56 +02:00
parent 1297b88918
commit a497871d6b
1 changed files with 6 additions and 1 deletions

View File

@ -58,7 +58,12 @@ class MonthViewWrapper(context: Context, attrs: AttributeSet, defStyle: Int) : F
private fun measureSizes() {
dayWidth = (width - horizontalOffset) / 7f
dayHeight = (height - weekDaysLetterHeight) / 6f
// avoid updating the height when coming back from a new event screen, when the keyboard was visible
val newHeight = (height - weekDaysLetterHeight) / 6f
if (newHeight > dayHeight) {
dayHeight = (height - weekDaysLetterHeight) / 6f
}
}
private fun addViews() {