本文整理汇总了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;
}
示例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");
}
}
示例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");
}
}
示例4: CCBaseDownloadTask
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity; //导入依赖的package包/类
public CCBaseDownloadTask(RxAppCompatActivity activity) {
this.netLifecycleComposer = activity.bindUntilEvent(ActivityEvent.DESTROY);
initTaskStamp();
}
示例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;
}
示例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));
}
示例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));
}