类 ExternalLiveData<T>


  • public class ExternalLiveData<T>
    extends androidx.lifecycle.MutableLiveData<T>
    Created by liaohailiang on 2019/3/7.
    • 字段概要

      字段 
      修饰符和类型 字段 说明
      static int START_VERSION  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      int getVersion()  
      void observe​(androidx.lifecycle.LifecycleOwner owner, androidx.lifecycle.Observer<? super T> observer)  
      protected androidx.lifecycle.Lifecycle.State observerActiveLevel()
      determine when the observer is active, means the observer can receive message the default value is CREATED, means if the observer's state is above create, for example, the onCreate() of activity is called you can change this value to CREATED/STARTED/RESUMED determine on witch state, you can receive message
      • 从类继承的方法 androidx.lifecycle.MutableLiveData

        postValue, setValue
      • 从类继承的方法 androidx.lifecycle.LiveData

        getValue, hasActiveObservers, hasObservers, observeForever, onActive, onInactive, removeObserver, removeObservers
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • START_VERSION

        public static final int START_VERSION
        另请参阅:
        常量字段值
    • 构造器详细资料

      • ExternalLiveData

        public ExternalLiveData()
    • 方法详细资料

      • observe

        public void observe​(@NonNull
                            androidx.lifecycle.LifecycleOwner owner,
                            @NonNull
                            androidx.lifecycle.Observer<? super T> observer)
        覆盖:
        observe 在类中 androidx.lifecycle.LiveData<T>
      • getVersion

        public int getVersion()
      • observerActiveLevel

        protected androidx.lifecycle.Lifecycle.State observerActiveLevel()
        determine when the observer is active, means the observer can receive message the default value is CREATED, means if the observer's state is above create, for example, the onCreate() of activity is called you can change this value to CREATED/STARTED/RESUMED determine on witch state, you can receive message
        返回:
        Lifecycle.State