本文整理汇总了Java中com.justwayward.reader.bean.BookLists.BookListsBean方法的典型用法代码示例。如果您正苦于以下问题:Java BookLists.BookListsBean方法的具体用法?Java BookLists.BookListsBean怎么用?Java BookLists.BookListsBean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.justwayward.reader.bean.BookLists
的用法示例。
在下文中一共展示了BookLists.BookListsBean方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addCollection
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
public void addCollection(BookLists.BookListsBean bean) {
List<BookLists.BookListsBean> list = getCollectionList();
if (list == null) {
list = new ArrayList<>();
}
for (BookLists.BookListsBean data : list) {
if (data != null) {
if (TextUtils.equals(data._id, bean._id)) {
ToastUtils.showToast("已经收藏过啦");
return;
}
}
}
list.add(bean);
ACache.get(ReaderApplication.getsInstance()).put(getCollectionKey(), (Serializable) list);
ToastUtils.showToast("收藏成功");
}
示例2: OnCreateViewHolder
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
@Override
public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
return new BaseViewHolder<BookLists.BookListsBean>(parent, R.layout.item_sub_category_list) {
@Override
public void setData(BookLists.BookListsBean item) {
super.setData(item);
if (!SettingManager.getInstance().isNoneCover()) {
holder.setRoundImageUrl(R.id.ivSubCateCover, Constant.IMG_BASE_URL + item.cover,
R.drawable.cover_default);
} else {
holder.setImageResource(R.id.ivSubCateCover, R.drawable.cover_default);
}
holder.setText(R.id.tvSubCateTitle, item.title)
.setText(R.id.tvSubCateAuthor, item.author)
.setText(R.id.tvSubCateShort, item.desc)
.setText(R.id.tvSubCateMsg, String.format(mContext.getResources().getString(R.string.subject_book_msg), item.bookCount, item.collectorCount));
}
};
}
示例3: onItemClick
import com.justwayward.reader.bean.BookLists; //导入方法依赖的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: removeCollection
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
public void removeCollection(String bookListId) {
List<BookLists.BookListsBean> list = getCollectionList();
if (list == null) {
return;
}
for (BookLists.BookListsBean bean : list) {
if (bean != null) {
if (TextUtils.equals(bean._id, bookListId)) {
list.remove(bean);
ACache.get(ReaderApplication.getsInstance()).put(getCollectionKey(), (Serializable) list);
break;
}
}
}
}
示例5: showBookList
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
@Override
public void showBookList(List<BookLists.BookListsBean> bookLists, boolean isRefresh) {
if (isRefresh) {
mAdapter.clear();
start = 0;
}
mAdapter.addAll(bookLists);
start = start + bookLists.size();
}
示例6: onRefresh
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
@Override
public void onRefresh() {
super.onRefresh();
List<BookLists.BookListsBean> data = CacheManager.getInstance().getCollectionList();
mAdapter.clear();
mAdapter.addAll(data);
mRecyclerView.setRefreshing(false);
}
示例7: getCollectionList
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
/**
* 获取我收藏的书单列表
*
* @return
*/
public List<BookLists.BookListsBean> getCollectionList() {
List<BookLists.BookListsBean> list = (ArrayList<BookLists.BookListsBean>) ACache.get(
ReaderApplication.getsInstance()).getAsObject(getCollectionKey());
return list == null ? null : list;
}
示例8: startActivity
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
public static void startActivity(Context context, BookLists.BookListsBean bookListsBean) {
context.startActivity(new Intent(context, SubjectBookListDetailActivity.class)
.putExtra(INTENT_BEAN, bookListsBean));
}
示例9: initDatas
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
@Override
public void initDatas() {
bookListsBean = (BookLists.BookListsBean) getIntent().getSerializableExtra(INTENT_BEAN);
}
示例10: showBookList
import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
void showBookList(List<BookLists.BookListsBean> bookLists, boolean isRefresh);