mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[Homework/UI] Make better gaining attention on FAB
This commit is contained in:
parent
54b56768c1
commit
8d86f9c7af
@ -755,7 +755,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
drawer.setSelection(target.id, fireOnClick = false)
|
drawer.setSelection(target.id, fireOnClick = false)
|
||||||
navView.toolbar.setTitle(target.title ?: target.name)
|
navView.toolbar.setTitle(target.title ?: target.name)
|
||||||
navView.bottomBar.fabEnable = false
|
navView.bottomBar.fabEnable = false
|
||||||
navView.bottomBar.fabExtended = true
|
navView.bottomBar.fabExtended = false
|
||||||
navView.bottomBar.setFabOnClickListener(null)
|
navView.bottomBar.setFabOnClickListener(null)
|
||||||
|
|
||||||
Log.d("NavDebug", "Navigating from ${navTarget.fragmentClass?.java?.simpleName} to ${target.fragmentClass?.java?.simpleName}")
|
Log.d("NavDebug", "Navigating from ${navTarget.fragmentClass?.java?.simpleName} to ${target.fragmentClass?.java?.simpleName}")
|
||||||
@ -868,10 +868,16 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}, 2000)
|
}, 2000)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun collapseFab() {
|
fun gainAttentionFAB() {
|
||||||
|
navView.bottomBar.fabExtended = false
|
||||||
|
|
||||||
|
b.navView.postDelayed({
|
||||||
|
navView.bottomBar.fabExtended = true
|
||||||
|
}, 1000)
|
||||||
|
|
||||||
b.navView.postDelayed({
|
b.navView.postDelayed({
|
||||||
navView.bottomBar.fabExtended = false
|
navView.bottomBar.fabExtended = false
|
||||||
}, 2000)
|
}, 3000)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _____ _ _
|
/* _____ _ _
|
||||||
|
@ -101,6 +101,6 @@ class HomeworkFragment : Fragment() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
activity.gainAttention()
|
activity.gainAttention()
|
||||||
activity.collapseFab()
|
activity.gainAttentionFAB()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user