类 ExternalLiveData<T>
- java.lang.Object
-
- androidx.lifecycle.LiveData<T>
-
- androidx.lifecycle.MutableLiveData<T>
-
- androidx.lifecycle.ExternalLiveData<T>
-
public class ExternalLiveData<T> extends androidx.lifecycle.MutableLiveData<T>Created by liaohailiang on 2019/3/7.
-
-
字段概要
字段 修饰符和类型 字段 说明 static intSTART_VERSION
-
构造器概要
构造器 构造器 说明 ExternalLiveData()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 intgetVersion()voidobserve(androidx.lifecycle.LifecycleOwner owner, androidx.lifecycle.Observer<? super T> observer)protected androidx.lifecycle.Lifecycle.StateobserverActiveLevel()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
-
-
-
字段详细资料
-
START_VERSION
public static final int START_VERSION
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
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
-
-