diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt b/app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt index 4995f873..6b1dd0f7 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/MainActivity.kt @@ -755,7 +755,7 @@ class MainActivity : AppCompatActivity() { drawer.setSelection(target.id, fireOnClick = false) navView.toolbar.setTitle(target.title ?: target.name) navView.bottomBar.fabEnable = false - navView.bottomBar.fabExtended = true + navView.bottomBar.fabExtended = false navView.bottomBar.setFabOnClickListener(null) Log.d("NavDebug", "Navigating from ${navTarget.fragmentClass?.java?.simpleName} to ${target.fragmentClass?.java?.simpleName}") @@ -868,10 +868,16 @@ class MainActivity : AppCompatActivity() { }, 2000) } - fun collapseFab() { + fun gainAttentionFAB() { + navView.bottomBar.fabExtended = false + + b.navView.postDelayed({ + navView.bottomBar.fabExtended = true + }, 1000) + b.navView.postDelayed({ navView.bottomBar.fabExtended = false - }, 2000) + }, 3000) } /* _____ _ _ diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/homework/HomeworkFragment.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/homework/HomeworkFragment.kt index 9ccd97ce..5afdd9a6 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/homework/HomeworkFragment.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/homework/HomeworkFragment.kt @@ -101,6 +101,6 @@ class HomeworkFragment : Fragment() { }) activity.gainAttention() - activity.collapseFab() + activity.gainAttentionFAB() } }