本文整理汇总了Java中com.trello.rxlifecycle.RxLifecycle类的典型用法代码示例。如果您正苦于以下问题:Java RxLifecycle类的具体用法?Java RxLifecycle怎么用?Java RxLifecycle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RxLifecycle类属于com.trello.rxlifecycle包,在下文中一共展示了RxLifecycle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
/**
* Executes the current use case.
*
* @param UseCaseSubscriber The guy who will be listen to the observable build
*/
@SuppressWarnings("unchecked")
public void execute(Subscriber UseCaseSubscriber, Observable observable, BaseActivity act) {
this.subscription = observable
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.compose(RxLifecycle.bindUntilEvent(act.lifecycle(), ActivityEvent.DESTROY))
.subscribe(UseCaseSubscriber);
}
示例2: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
public final <T> Observable.Transformer<T, T> bindUntilEvent(FragmentEvent event) {
return RxLifecycle.bindUntilFragmentEvent(lifecycleSubject, event);
}
示例3: bindToLifecycle
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
public final <T> Observable.Transformer<T, T> bindToLifecycle() {
return RxLifecycle.bindFragment(lifecycleSubject);
}
示例4: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> LifecycleTransformer<T> bindUntilEvent(@NonNull ActivityEvent event) {
return RxLifecycle.bindUntilEvent(lifecycleSubject, event);
}
示例5: bindToLifecycle
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> LifecycleTransformer<T> bindToLifecycle() {
return RxLifecycle.bindActivity(lifecycleSubject);
}
示例6: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
/**
* Completes an observable when an {@link ActivityEvent} occurs in the activity's lifecycle.
*/
public <T> Observable.Transformer<T, T> bindUntilEvent(final ActivityEvent event) {
return RxLifecycle.bindUntilEvent(lifecycle, event);
}
示例7: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <K> LifecycleTransformer<K> bindUntilEvent(@NonNull PresenterEvent event) {
return RxLifecycle.bindUntilEvent(lifecycleSubject, event);
}
示例8: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> Observable.Transformer<T, T> bindUntilEvent(@NonNull ActivityEvent event) {
return RxLifecycle.bindUntilEvent(lifecycleSubject, event);
}
示例9: bindToLifecycle
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> Observable.Transformer<T, T> bindToLifecycle() {
return RxLifecycle.bindActivity(lifecycleSubject);
}
示例10: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> Observable.Transformer<T, T> bindUntilEvent(@NonNull FragmentEvent event) {
return RxLifecycle.bindUntilEvent(lifecycleSubject, event);
}
示例11: bindToLifecycle
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> Observable.Transformer<T, T> bindToLifecycle() {
return RxLifecycle.bindFragment(lifecycleSubject);
}
示例12: safely
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
protected <T> Observable.Transformer<T, T> safely() {
return observable -> observable.compose(applySchedulers())
.compose(RxLifecycle.bindFragment(lifecycle()));
}
示例13: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
/**
* Completes an observable when an {@link ActivityEvent} occurs in the activity's lifecycle.
*/
public final <T> Observable.Transformer<T, T> bindUntilEvent(final ActivityEvent event) {
return RxLifecycle.bindUntilActivityEvent(this.lifecycle, event);
}
示例14: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
/**
* Completes an observable when an {@link FragmentEvent} occurs in the fragment's lifecycle.
*/
@Override
public final @NonNull <T> Observable.Transformer<T, T> bindUntilEvent(final @NonNull FragmentEvent event) {
return RxLifecycle.bindUntilFragmentEvent(this.lifecycle, event);
}
示例15: bindUntilEvent
import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
/**
* Completes an observable when an {@link ActivityEvent} occurs in the activity's lifecycle.
*/
public final @NonNull <T> Observable.Transformer<T, T> bindUntilEvent(final @NonNull ActivityEvent event) {
return RxLifecycle.bindUntilActivityEvent(this.lifecycle, event);
}