本文整理汇总了Java中com.justwayward.reader.bean.BookReviewList类的典型用法代码示例。如果您正苦于以下问题:Java BookReviewList类的具体用法?Java BookReviewList怎么用?Java BookReviewList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BookReviewList类属于com.justwayward.reader.bean包,在下文中一共展示了BookReviewList类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showBookReviewList
import com.justwayward.reader.bean.BookReviewList; //导入依赖的package包/类
@Override
public void showBookReviewList(List<BookReviewList.ReviewsBean> list, boolean isRefresh) {
if (isRefresh) {
mAdapter.clear();
}
mAdapter.addAll(list);
start = start + list.size();
}
示例2: OnCreateViewHolder
import com.justwayward.reader.bean.BookReviewList; //导入依赖的package包/类
@Override
public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
return new BaseViewHolder<BookReviewList.ReviewsBean>(parent, R.layout.item_community_book_review_list) {
@Override
public void setData(BookReviewList.ReviewsBean item) {
if (!SettingManager.getInstance().isNoneCover()) {
holder.setRoundImageUrl(R.id.ivBookCover, Constant.IMG_BASE_URL + item.book.cover,
R.drawable.cover_default);
} else {
holder.setImageResource(R.id.ivBookCover, R.drawable.cover_default);
}
holder.setText(R.id.tvBookTitle, item.book.title)
.setText(R.id.tvBookType, String.format(mContext.getString(R.string.book_review_book_type), Constant.bookType.get(item.book.type)))
.setText(R.id.tvTitle, item.title)
.setText(R.id.tvHelpfulYes, String.format(mContext.getString(R.string.book_review_helpful_yes), item.helpful.yes));
if (TextUtils.equals(item.state, "hot")) {
holder.setVisible(R.id.tvHot, true);
holder.setVisible(R.id.tvTime, false);
holder.setVisible(R.id.tvDistillate, false);
} else if (TextUtils.equals(item.state, "distillate")) {
holder.setVisible(R.id.tvDistillate, true);
holder.setVisible(R.id.tvHot, false);
holder.setVisible(R.id.tvTime, false);
} else {
holder.setVisible(R.id.tvTime, true);
holder.setVisible(R.id.tvHot, false);
holder.setVisible(R.id.tvDistillate, false);
holder.setText(R.id.tvTime, FormatUtils.getDescriptionTimeFromDateString(item.created));
}
}
};
}
示例3: getBookReviewList
import com.justwayward.reader.bean.BookReviewList; //导入依赖的package包/类
@Override
public void getBookReviewList(final String sort, final String type, final String distillate, final int start, final int limit) {
String key = StringUtils.creatAcacheKey("book-review-list", sort, type, distillate, start, limit);
Observable<BookReviewList> fromNetWork = bookApi.getBookReviewList("all", sort, type, start + "", limit + "", distillate)
.compose(RxUtil.<BookReviewList>rxCacheListHelper(key));
//依次检查disk、network
Subscription rxSubscription = Observable.concat(RxUtil.rxCreateDiskObservable(key, BookReviewList.class), fromNetWork)
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BookReviewList>() {
@Override
public void onCompleted() {
mView.complete();
}
@Override
public void onError(Throwable e) {
LogUtils.e("onError: "+e.toString());
mView.showError();
}
@Override
public void onNext(BookReviewList list) {
LogUtils.d("onNext: get data finish");
boolean isRefresh = start == 0 ? true : false;
mView.showBookReviewList(list.reviews, isRefresh);
}
});
addSubscrebe(rxSubscription);
}
示例4: getBookReviewList
import com.justwayward.reader.bean.BookReviewList; //导入依赖的package包/类
public Observable<BookReviewList> getBookReviewList(String duration, String sort, String type, String start, String limit, String distillate) {
return service.getBookReviewList(duration, sort, type, start, limit, distillate);
}
示例5: onItemClick
import com.justwayward.reader.bean.BookReviewList; //导入依赖的package包/类
@Override
public void onItemClick(int position) {
BookReviewList.ReviewsBean data = mAdapter.getItem(position);
BookReviewDetailActivity.startActivity(activity, data._id);
}
示例6: getBookReviewList
import com.justwayward.reader.bean.BookReviewList; //导入依赖的package包/类
/**
* 获取书评区帖子列表
* 全部、全部类型、默认排序 http://api.zhuishushenqi.com/post/review?duration=all&sort=updated&type=all&start=0&limit=20&distillate=
* 精品、玄幻奇幻、默认排序 http://api.zhuishushenqi.com/post/review?duration=all&sort=updated&type=xhqh&start=0&limit=20&distillate=true
*
* @param duration all
* @param sort updated(默认排序)
* created(最新发布)
* helpful(最有用的)
* comment-count(最多评论)
* @param type all(全部类型)、xhqh(玄幻奇幻)、dsyn(都市异能)...
* @param start 0
* @param limit 20
* @param distillate true(精品) 、空字符(全部)
* @return
*/
@GET("/post/review")
Observable<BookReviewList> getBookReviewList(@Query("duration") String duration, @Query("sort") String sort, @Query("type") String type, @Query("start") String start, @Query("limit") String limit, @Query("distillate") String distillate);
示例7: showBookReviewList
import com.justwayward.reader.bean.BookReviewList; //导入依赖的package包/类
void showBookReviewList(List<BookReviewList.ReviewsBean> list, boolean isRefresh);