update the function for resizing weekly view items

This commit is contained in:
tibbi 2020-03-22 18:14:20 +01:00
parent def42889dc
commit c9bde11ca4
1 changed files with 4 additions and 1 deletions

View File

@ -111,10 +111,13 @@ class WeekFragmentsHolder : MyFragmentHolder(), WeekFragmentListener {
private fun updateRowHeight() { private fun updateRowHeight() {
val childCnt = weekHolder!!.week_view_hours_holder.childCount val childCnt = weekHolder!!.week_view_hours_holder.childCount
val itemHeight = context!!.config.weeklyViewItemHeight.toInt()
for (i in 0..childCnt) { for (i in 0..childCnt) {
val textView = weekHolder!!.week_view_hours_holder.getChildAt(i) as? TextView ?: continue val textView = weekHolder!!.week_view_hours_holder.getChildAt(i) as? TextView ?: continue
textView.layoutParams.height = context!!.config.weeklyViewItemHeight.toInt() textView.layoutParams.height = itemHeight
} }
weekHolder!!.week_view_hours_holder.setPadding(0, 0, 0, itemHeight)
} }
private fun getWeekTimestamps(targetSeconds: Long): List<Long> { private fun getWeekTimestamps(targetSeconds: Long): List<Long> {