[UI] Fix timetable crash when syncing (#54)

* Fix removeView

* Use removeView() instead of removeAllViews()

* Remove dayView from layout file
This commit is contained in:
doteq 2021-06-11 22:06:07 +02:00 committed by GitHub
parent a4d604e146
commit 4bed62aa6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 7 deletions

View File

@ -151,7 +151,7 @@ class TimetableDayFragment : LazyFragment(), CoroutineScope {
} }
b.scrollView.isVisible = true b.scrollView.isVisible = true
b.dayFrame.removeView(b.dayView) b.dayFrame.removeView(dayView)
b.dayFrame.addView(dayView, 0) b.dayFrame.addView(dayView, 0)
// Inflate a label view for each hour the day view will display // Inflate a label view for each hour the day view will display

View File

@ -36,12 +36,6 @@
android:layout_marginHorizontal="8dp" android:layout_marginHorizontal="8dp"
android:background="@color/md_red_500" android:background="@color/md_red_500"
tools:layout_marginTop="100dp" /> tools:layout_marginTop="100dp" />
<com.linkedin.android.tachyon.DayView
android:id="@+id/dayView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:layout_height="match_parent" />
</FrameLayout> </FrameLayout>
</pl.szczodrzynski.edziennik.utils.ListenerScrollView> </pl.szczodrzynski.edziennik.utils.ListenerScrollView>