openHPI / xikolo-android

📱 Android App of the HPI MOOC Platform
https://play.google.com/store/apps/dev?id=7185448023325736337
GNU General Public License v3.0
41 stars 15 forks source link

Fix for blank screen in CourseItemsActivity upon rotation #199

Closed bengelhaupt closed 4 years ago

bengelhaupt commented 4 years ago

I believe this is caused by our messy handling of the fragment adapter (which I do not want to touch again), but this workaround fix works as well.

bengelhaupt commented 4 years ago

As far as I'm concerned it has nothing to do with #205.

I found out it's the line updateViewPager(listOf()) at the end of CourseItemsActivity.onCreate() that causes the bug. It has been introduced in https://github.com/openHPI/xikolo-android/commit/dbeee09752cb55532b7e8812a4aadcdf1ca8f2a3#diff-d40a63043cd4256834516fb97b4933da but I dont quite remember why I made that change. It might be some edge-case.

tobiasrohloff commented 4 years ago

Oh, haha, let's see if something else breaks instead 😅