1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2024-11-23 06:46:04 -06:00

Fix snackbar crash in grade statistics view (#1682)

This commit is contained in:
Rafał Borcz 2021-11-25 23:48:08 +01:00 committed by GitHub
parent 10ba36ba44
commit 495e385228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 137 additions and 139 deletions

View File

@ -123,14 +123,6 @@ class FragmentLifecycleLogger @Inject constructor() :
Timber.d("${f::class.java.simpleName} VIEW DESTROYED") Timber.d("${f::class.java.simpleName} VIEW DESTROYED")
} }
override fun onFragmentActivityCreated(
fm: FragmentManager,
f: Fragment,
savedInstanceState: Bundle?
) {
Timber.d("${f::class.java.simpleName} ACTIVITY CREATED ${savedInstanceState.checkSavedState()}")
}
override fun onFragmentPaused(fm: FragmentManager, f: Fragment) { override fun onFragmentPaused(fm: FragmentManager, f: Fragment) {
Timber.d("${f::class.java.simpleName} PAUSED") Timber.d("${f::class.java.simpleName} PAUSED")
} }
@ -141,5 +133,5 @@ class FragmentLifecycleLogger @Inject constructor() :
} }
private fun Bundle?.checkSavedState() = private fun Bundle?.checkSavedState() =
if (this == null) "(STATE IS NULL)" else "(STATE IS NOT NULL)" if (this == null) "(STATE IS NULL)" else "(RESTORE STATE)"

View File

@ -1,9 +1,14 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical"
tools:ignore="UselessParent">
<io.github.wulkanowy.ui.widgets.MaterialLinearLayout <io.github.wulkanowy.ui.widgets.MaterialLinearLayout
android:id="@+id/gradeStatisticsSubjectsContainer" android:id="@+id/gradeStatisticsSubjectsContainer"
@ -155,4 +160,5 @@
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</LinearLayout> </LinearLayout>
</FrameLayout>