app / io.geeteshk.dot.ui.main / MainActivity / StateObserver

StateObserver

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

Constructors

<init>

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

Functions

onPause

fun onPause(): Unit

On pausing make sure we stop flashing

onResume

fun onResume(): Unit

On resuming we reset the drawable image to its correct icon