本文整理汇总了Java中com.justwayward.reader.bean.RecommendBookList类的典型用法代码示例。如果您正苦于以下问题:Java RecommendBookList类的具体用法?Java RecommendBookList怎么用?Java RecommendBookList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RecommendBookList类属于com.justwayward.reader.bean包,在下文中一共展示了RecommendBookList类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onBindData
import com.justwayward.reader.bean.RecommendBookList; //导入依赖的package包/类
@Override
protected void onBindData(final EasyRVHolder holder, final int position, final RecommendBookList.RecommendBook item) {
if (!SettingManager.getInstance().isNoneCover()) {
holder.setRoundImageUrl(R.id.ivBookListCover, Constant.IMG_BASE_URL + item.cover, R.drawable.cover_default);
}
holder.setText(R.id.tvBookListTitle, item.title)
.setText(R.id.tvBookAuthor, item.author)
.setText(R.id.tvBookListTitle, item.title)
.setText(R.id.tvBookListDesc, item.desc)
.setText(R.id.tvBookCount, String.format(mContext.getString(R.string
.book_detail_recommend_book_list_book_count), item.bookCount))
.setText(R.id.tvCollectorCount, String.format(mContext.getString(R.string
.book_detail_recommend_book_list_collector_count), item.collectorCount));
holder.setOnItemViewClickListener(new NoDoubleClickListener() {
@Override
protected void onNoDoubleClick(View view) {
itemClickListener.onItemClick(holder.getItemView(), position, item);
}
});
}
示例2: getRecommendBookList
import com.justwayward.reader.bean.RecommendBookList; //导入依赖的package包/类
@Override
public void getRecommendBookList(String bookId, String limit) {
Subscription rxSubscription = bookApi.getRecommendBookList(bookId, limit).subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<RecommendBookList>() {
@Override
public void onNext(RecommendBookList data) {
LogUtils.i(data.booklists);
List<RecommendBookList.RecommendBook> list = data.booklists;
if (list != null && !list.isEmpty() && mView != null) {
mView.showRecommendBookList(list);
}
}
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
LogUtils.e("+++" + e.toString());
}
});
addSubscrebe(rxSubscription);
}
示例3: onItemClick
import com.justwayward.reader.bean.RecommendBookList; //导入依赖的package包/类
@Override
public void onItemClick(View view, int position, Object data) {
if (data instanceof HotReview.Reviews) {
BookDiscussionDetailActivity.startActivity(this, ((HotReview.Reviews) data)._id);
} else if (data instanceof RecommendBookList.RecommendBook) {
RecommendBookList.RecommendBook recommendBook = (RecommendBookList.RecommendBook) data;
BookLists bookLists = new BookLists();
BookLists.BookListsBean bookListsBean = bookLists.new BookListsBean();
bookListsBean._id = recommendBook.id;
bookListsBean.author = recommendBook.author;
bookListsBean.bookCount = recommendBook.bookCount;
bookListsBean.collectorCount = recommendBook.collectorCount;
bookListsBean.cover = recommendBook.cover;
bookListsBean.desc = recommendBook.desc;
bookListsBean.title = recommendBook.title;
SubjectBookListDetailActivity.startActivity(this, bookListsBean);
}
}
示例4: showRecommendBookList
import com.justwayward.reader.bean.RecommendBookList; //导入依赖的package包/类
@Override
public void showRecommendBookList(List<RecommendBookList.RecommendBook> list) {
if (!list.isEmpty()) {
mTvRecommendBookList.setVisibility(View.VISIBLE);
mRecommendBookList.clear();
mRecommendBookList.addAll(list);
mRecommendBookListAdapter.notifyDataSetChanged();
}
}
示例5: getRecommendBookList
import com.justwayward.reader.bean.RecommendBookList; //导入依赖的package包/类
@GET("/book-list/{bookId}/recommend")
Observable<RecommendBookList> getRecommendBookList(@Path("bookId") String bookId, @Query("limit") String limit);
示例6: getRecommendBookList
import com.justwayward.reader.bean.RecommendBookList; //导入依赖的package包/类
public Observable<RecommendBookList> getRecommendBookList(String bookId, String limit) {
return service.getRecommendBookList(bookId, limit);
}
示例7: RecommendBookListAdapter
import com.justwayward.reader.bean.RecommendBookList; //导入依赖的package包/类
public RecommendBookListAdapter(Context context, List<RecommendBookList.RecommendBook> list,
OnRvItemClickListener listener) {
super(context, list, R.layout.item_book_detail_recommend_book_list);
this.itemClickListener = listener;
}
示例8: showRecommendBookList
import com.justwayward.reader.bean.RecommendBookList; //导入依赖的package包/类
void showRecommendBookList(List<RecommendBookList.RecommendBook> list);