本文整理汇总了Java中com.justwayward.reader.bean.ChapterRead类的典型用法代码示例。如果您正苦于以下问题:Java ChapterRead类的具体用法?Java ChapterRead怎么用?Java ChapterRead使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChapterRead类属于com.justwayward.reader.bean包,在下文中一共展示了ChapterRead类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChapterRead
import com.justwayward.reader.bean.ChapterRead; //导入依赖的package包/类
@Override
public void getChapterRead(String url, final int chapter) {
Subscription rxSubscription = bookApi.getChapterRead(url).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<ChapterRead>() {
@Override
public void onNext(ChapterRead data) {
if (data.chapter != null && mView != null) {
mView.showChapterRead(data.chapter, chapter);
} else {
mView.netError(chapter);
}
}
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
LogUtils.e("onError: " + e);
mView.netError(chapter);
}
});
addSubscrebe(rxSubscription);
}
示例2: showChapterRead
import com.justwayward.reader.bean.ChapterRead; //导入依赖的package包/类
@Override
public synchronized void showChapterRead(ChapterRead.Chapter data, int chapter) { // 加载章节内容
if (data != null) {
CacheManager.getInstance().saveChapterFile(bookId, chapter, data);
}
if (!startRead) {
startRead = true;
currentChapter = chapter;
if (!mPageWidget.isPrepared) {
mPageWidget.init(curTheme);
} else {
mPageWidget.jumpToChapter(currentChapter);
}
hideDialog();
}
}
示例3: saveChapterFile
import com.justwayward.reader.bean.ChapterRead; //导入依赖的package包/类
public void saveChapterFile(String bookId, int chapter, ChapterRead.Chapter data) {
File file = FileUtils.getChapterFile(bookId, chapter);
FileUtils.writeFile(file.getAbsolutePath(), StringUtils.formatContent(data.body), false);
}
示例4: getChapterRead
import com.justwayward.reader.bean.ChapterRead; //导入依赖的package包/类
@GET("http://chapter2.zhuishushenqi.com/chapter/{url}")
Observable<ChapterRead> getChapterRead(@Path("url") String url);
示例5: getChapterRead
import com.justwayward.reader.bean.ChapterRead; //导入依赖的package包/类
public synchronized Observable<ChapterRead> getChapterRead(String url) {
return service.getChapterRead(url);
}
示例6: showChapterRead
import com.justwayward.reader.bean.ChapterRead; //导入依赖的package包/类
void showChapterRead(ChapterRead.Chapter data, int chapter);