当前位置: 首页>>代码示例>>Java>>正文


Java RxLifecycle类代码示例

本文整理汇总了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);
}
 
开发者ID:MPDL,项目名称:LabCam,代码行数:14,代码来源:BaseService.java

示例2: bindUntilEvent

import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
public final <T> Observable.Transformer<T, T> bindUntilEvent(FragmentEvent event) {
    return RxLifecycle.bindUntilFragmentEvent(lifecycleSubject, event);
}
 
开发者ID:Aiushtha,项目名称:Go-RxJava,代码行数:5,代码来源:RxV4Fragment.java

示例3: bindToLifecycle

import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
public final <T> Observable.Transformer<T, T> bindToLifecycle() {
    return RxLifecycle.bindFragment(lifecycleSubject);
}
 
开发者ID:Aiushtha,项目名称:Go-RxJava,代码行数:5,代码来源:RxV4Fragment.java

示例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);
}
 
开发者ID:jeasinlee,项目名称:AndroidBasicLibs,代码行数:7,代码来源:BaseActivity.java

示例5: bindToLifecycle

import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> LifecycleTransformer<T> bindToLifecycle() {
    return RxLifecycle.bindActivity(lifecycleSubject);
}
 
开发者ID:jeasinlee,项目名称:AndroidBasicLibs,代码行数:7,代码来源:BaseActivity.java

示例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);
}
 
开发者ID:fobid,项目名称:rxbase-android,代码行数:7,代码来源:TfcBaseActivity.java

示例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);
}
 
开发者ID:Popalay,项目名称:RxLifecycleMoxy,代码行数:7,代码来源:RxPresenter.java

示例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);
}
 
开发者ID:christophwidulle,项目名称:Raclette,代码行数:7,代码来源:RacletteRxActivity.java

示例9: bindToLifecycle

import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> Observable.Transformer<T, T> bindToLifecycle() {
    return RxLifecycle.bindActivity(lifecycleSubject);
}
 
开发者ID:christophwidulle,项目名称:Raclette,代码行数:7,代码来源:RacletteRxActivity.java

示例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);
}
 
开发者ID:christophwidulle,项目名称:Raclette,代码行数:7,代码来源:RacletteRxFragment.java

示例11: bindToLifecycle

import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
@Override
@NonNull
@CheckResult
public final <T> Observable.Transformer<T, T> bindToLifecycle() {
    return RxLifecycle.bindFragment(lifecycleSubject);
}
 
开发者ID:christophwidulle,项目名称:Raclette,代码行数:7,代码来源:RacletteRxFragment.java

示例12: safely

import com.trello.rxlifecycle.RxLifecycle; //导入依赖的package包/类
protected <T> Observable.Transformer<T, T> safely() {
    return observable -> observable.compose(applySchedulers())
            .compose(RxLifecycle.bindFragment(lifecycle()));
}
 
开发者ID:FuckBoilerplate,项目名称:base_app_android,代码行数:5,代码来源:BaseFragment.java

示例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);
}
 
开发者ID:kickstarter,项目名称:android-oss,代码行数:7,代码来源:BaseActivity.java

示例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);
}
 
开发者ID:kickstarter,项目名称:android-oss,代码行数:8,代码来源:BaseFragment.java

示例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);
}
 
开发者ID:kickstarter,项目名称:android-oss,代码行数:7,代码来源:KSViewHolder.java


注:本文中的com.trello.rxlifecycle.RxLifecycle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。