Class MutableLiveEvent

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit observe(LifecycleOwner owner, Observer<in T> observer) Similar to LiveData.observe adds the given observer to the observers list within the lifespan of the given owner.
      Unit setValue(T value) Similar to LiveData.setValue but ensures data is only delivered during an explicit call.
      Unit postValue(T value) Similar to LiveData.postValue.
      final Unit call() Used for cases where T is Void, to make calls cleaner.
      • Methods inherited from class androidx.lifecycle.LiveData

        getValue, hasActiveObservers, hasObservers, isInitialized, observeForever, removeObserver, removeObservers
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait