当前位置: 首页>>代码示例>>Java>>正文


Java BookLists.BookListsBean方法代码示例

本文整理汇总了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("收藏成功");
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:18,代码来源:CacheManager.java

示例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));
        }
    };
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:SubjectBookListAdapter.java

示例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);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:21,代码来源:BookDetailActivity.java

示例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;
            }
        }
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:CacheManager.java

示例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();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:10,代码来源:SubjectFragment.java

示例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);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:9,代码来源:MyBookListActivity.java

示例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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:11,代码来源:CacheManager.java

示例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));
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:SubjectBookListDetailActivity.java

示例9: initDatas

import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
@Override
public void initDatas() {
    bookListsBean = (BookLists.BookListsBean) getIntent().getSerializableExtra(INTENT_BEAN);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:SubjectBookListDetailActivity.java

示例10: showBookList

import com.justwayward.reader.bean.BookLists; //导入方法依赖的package包/类
void showBookList(List<BookLists.BookListsBean> bookLists, boolean isRefresh); 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:2,代码来源:SubjectFragmentContract.java


注:本文中的com.justwayward.reader.bean.BookLists.BookListsBean方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。