inner class StateObserver : LifecycleObserver
A LifeCycleObserver that ensures our program looks and behaves correctly with lifecycle changes i.e. ensure the right FloatingActionButton icon is set and ensure we don't flash when the user leaves the app
StateObserver()
A LifeCycleObserver that ensures our program looks and behaves correctly with lifecycle changes i.e. ensure the right FloatingActionButton icon is set and ensure we don't flash when the user leaves the app |
fun onPause(): Unit
On pausing make sure we stop flashing |
|
fun onResume(): Unit
On resuming we reset the drawable image to its correct icon |