From 4bed62aa6f6690ce5433e30b42674c17f3a3e82a Mon Sep 17 00:00:00 2001 From: doteq Date: Fri, 11 Jun 2021 22:06:07 +0200 Subject: [PATCH] [UI] Fix timetable crash when syncing (#54) * Fix removeView * Use removeView() instead of removeAllViews() * Remove dayView from layout file --- .../edziennik/ui/modules/timetable/TimetableDayFragment.kt | 2 +- app/src/main/res/layout/timetable_day_fragment.xml | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/TimetableDayFragment.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/TimetableDayFragment.kt index 3fc9ce83..00ce872e 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/TimetableDayFragment.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/timetable/TimetableDayFragment.kt @@ -151,7 +151,7 @@ class TimetableDayFragment : LazyFragment(), CoroutineScope { } b.scrollView.isVisible = true - b.dayFrame.removeView(b.dayView) + b.dayFrame.removeView(dayView) b.dayFrame.addView(dayView, 0) // Inflate a label view for each hour the day view will display diff --git a/app/src/main/res/layout/timetable_day_fragment.xml b/app/src/main/res/layout/timetable_day_fragment.xml index 5464482d..041f6e1f 100644 --- a/app/src/main/res/layout/timetable_day_fragment.xml +++ b/app/src/main/res/layout/timetable_day_fragment.xml @@ -36,12 +36,6 @@ android:layout_marginHorizontal="8dp" android:background="@color/md_red_500" tools:layout_marginTop="100dp" /> - -