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


Java RxAppCompatActivity类代码示例

本文整理汇总了Java中com.trello.rxlifecycle2.components.support.RxAppCompatActivity的典型用法代码示例。如果您正苦于以下问题:Java RxAppCompatActivity类的具体用法?Java RxAppCompatActivity怎么用?Java RxAppCompatActivity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


RxAppCompatActivity类属于com.trello.rxlifecycle2.components.support包,在下文中一共展示了RxAppCompatActivity类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: CCDownloadTask

import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; //导入依赖的package包/类
public CCDownloadTask(RxAppCompatActivity activity, String taskKey, String sourceUrl, String savePath, String saveName, int priority, long fileSize, long downloadedSize) {
    super(activity);
    this.taskKey = taskKey;
    this.sourceUrl = sourceUrl;
    this.savePath = savePath;
    this.saveName = saveName;
    this.priority = priority;
    this.downloadStatus = CCDownloadStatus.WAIT;
    this.fileSize = fileSize;
    this.downloadedSize = downloadedSize;
}
 
开发者ID:CodingCodersCode,项目名称:EvolvingNetLib,代码行数:12,代码来源:CCDownloadTask.java

示例2: bindToLifeCycle

import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; //导入依赖的package包/类
public static LifecycleProvider bindToLifeCycle(IView view) {
    if (view instanceof RxAppCompatActivity) {
        return (LifecycleProvider<ActivityEvent>) view;
    } else if (view instanceof RxFragment) {
        return (LifecycleProvider<Fragment>) view;
    } else {
        throw new IllegalArgumentException("Unable find fragment or activity properly");
    }
}
 
开发者ID:harrylefit,项目名称:EazyBaseMVP,代码行数:10,代码来源:RxUtils.java

示例3: bindToLifecycle

import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; //导入依赖的package包/类
public static <T> LifecycleTransformer<T> bindToLifecycle(IView view) {
    if (view instanceof RxAppCompatActivity) {
        return ((RxAppCompatActivity) view).bindToLifecycle();
    } else if (view instanceof RxFragment) {
        return ((RxFragment) view).bindToLifecycle();
    } else {
        throw new IllegalArgumentException("view isn't activity or fragment");
    }

}
 
开发者ID:hshare,项目名称:MVPArmsTest1,代码行数:11,代码来源:RxUtils.java

示例4: CCBaseDownloadTask

import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; //导入依赖的package包/类
public CCBaseDownloadTask(RxAppCompatActivity activity) {
    this.netLifecycleComposer = activity.bindUntilEvent(ActivityEvent.DESTROY);
    initTaskStamp();
}
 
开发者ID:CodingCodersCode,项目名称:EvolvingNetLib,代码行数:5,代码来源:CCBaseDownloadTask.java

示例5: CCDownloadTask2

import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; //导入依赖的package包/类
public CCDownloadTask2(RxAppCompatActivity activity, String taskKey, String sourceUrl, String savePath, String saveName, int priority, long fileSize, long downloadedSize) {
    super(sourceUrl, savePath, saveName, priority, null, fileSize);
    this.taskKey = taskKey;
    this.downloadStatus = CCDownloadStatus.WAIT;
    this.downloadedSize = downloadedSize;
}
 
开发者ID:CodingCodersCode,项目名称:EvolvingNetLib,代码行数:7,代码来源:CCDownloadTask2.java

示例6: activityLifecycle

import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; //导入依赖的package包/类
public static <T> ObservableTransformer<T, T> activityLifecycle(RxAppCompatActivity activity) {
    return observable ->
        observable.compose(activity.bindUntilEvent(ActivityEvent.DESTROY));
}
 
开发者ID:xcc3641,项目名称:SeeWeather,代码行数:5,代码来源:RxUtil.java

示例7: activityLifecycleF

import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; //导入依赖的package包/类
public static <T> FlowableTransformer<T, T> activityLifecycleF(RxAppCompatActivity activity) {
    return flowable ->
        flowable.compose(activity.bindUntilEvent(ActivityEvent.DESTROY));
}
 
开发者ID:xcc3641,项目名称:SeeWeather,代码行数:5,代码来源:RxUtil.java


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