Package 

Class LiveEvent

  • All Implemented Interfaces:

    
    public class LiveEvent<T extends Object>
    extends MediatorLiveData<T>
                        

    A class to handle single live events in Android MVVM architectural pattern to propagate the data as an event, which means it emits data just once, not after configuration changes again. Note that event will only be sent to active observers, any observers that started observing after the emit won't be notified of the event.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      LiveEvent()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit observe(LifecycleOwner owner, Observer<in T> observer)
      Unit observeForever(Observer<in T> observer)
      Unit removeObserver(Observer<in T> observer)
      Unit setValue(T t)
      • Methods inherited from class androidx.lifecycle.MutableLiveData

        changeActiveCounter, dispatchingValue, getValue, getVersion, hasActiveObservers, hasObservers, removeObservers
      • Methods inherited from class androidx.lifecycle.MediatorLiveData

        postValue
      • Methods inherited from class apptentive.com.android.core.LiveEvent

        addSource, onActive, onInactive, removeSource
      • Methods inherited from class java.lang.Object

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