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


Java CommentList类代码示例

本文整理汇总了Java中com.justwayward.reader.bean.CommentList的典型用法代码示例。如果您正苦于以下问题:Java CommentList类的具体用法?Java CommentList怎么用?Java CommentList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CommentList类属于com.justwayward.reader.bean包,在下文中一共展示了CommentList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBindData

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
protected void onBindData(final EasyRVHolder viewHolder, final int position, final CommentList.CommentsBean item) {viewHolder.setCircleImageUrl(R.id.ivBookCover, Constant.IMG_BASE_URL + item.author.avatar, R.drawable.avatar_default)
            .setText(R.id.tvBookTitle, item.author.nickname)
            .setText(R.id.tvContent, item.content)
            .setText(R.id.tvBookType, String.format(mContext.getString(R.string.book_detail_user_lv), item.author.lv))
            .setText(R.id.tvFloor, String.format(mContext.getString(R.string.comment_floor), item.floor))
            .setText(R.id.tvLikeCount, String.format(mContext.getString(R.string.comment_like_count), item.likeCount));

    viewHolder.setOnItemViewClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            if(listener != null)
                listener.onItemClick(viewHolder.getItemView(), position, item);
        }
    });
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:BestCommentListAdapter.java

示例2: getBestComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void getBestComments(String disscussionId) {
    Subscription rxSubscription = bookApi.getBestComments(disscussionId)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(new Observer<CommentList>() {
                @Override
                public void onCompleted() {

                }

                @Override
                public void onError(Throwable e) {
                    LogUtils.e("getBestComments:" + e.toString());
                }

                @Override
                public void onNext(CommentList list) {
                    mView.showBestComments(list);
                }
            });
    addSubscrebe(rxSubscription);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:24,代码来源:BookHelpDetailPresenter.java

示例3: getBookHelpComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void getBookHelpComments(String disscussionId, int start, int limit) {
    Subscription rxSubscription = bookApi.getBookReviewComments(disscussionId, start + "", limit + "")
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(new Observer<CommentList>() {
                @Override
                public void onCompleted() {

                }

                @Override
                public void onError(Throwable e) {
                    LogUtils.e("getBookHelpComments:" + e.toString());
                }

                @Override
                public void onNext(CommentList list) {
                    mView.showBookHelpComments(list);
                }
            });
    addSubscrebe(rxSubscription);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:24,代码来源:BookHelpDetailPresenter.java

示例4: getBookDisscussionComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void getBookDisscussionComments(String disscussionId, int start, int limit) {
    Subscription rxSubscription = bookApi.getBookDisscussionComments(disscussionId, start + "", limit + "")
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(new Observer<CommentList>() {
                @Override
                public void onCompleted() {

                }

                @Override
                public void onError(Throwable e) {
                    LogUtils.e("getBookDisscussionComments:" + e.toString());
                }

                @Override
                public void onNext(CommentList list) {
                    mView.showBookDisscussionComments(list);
                }
            });
    addSubscrebe(rxSubscription);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:24,代码来源:BookDiscussionDetailPresenter.java

示例5: getBestComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void getBestComments(String bookReviewId) {
    Subscription rxSubscription = bookApi.getBestComments(bookReviewId)
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(new Observer<CommentList>() {
                @Override
                public void onCompleted() {

                }

                @Override
                public void onError(Throwable e) {
                    LogUtils.e("getBestComments:" + e.toString());
                }

                @Override
                public void onNext(CommentList list) {
                    mView.showBestComments(list);
                }
            });
    addSubscrebe(rxSubscription);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:24,代码来源:BookReviewDetailPresenter.java

示例6: getBookReviewComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void getBookReviewComments(String bookReviewId, int start, int limit) {
    Subscription rxSubscription = bookApi.getBookReviewComments(bookReviewId, start + "", limit + "")
            .subscribeOn(Schedulers.io())
            .observeOn(AndroidSchedulers.mainThread())
            .subscribe(new Observer<CommentList>() {
                @Override
                public void onCompleted() {

                }

                @Override
                public void onError(Throwable e) {
                    LogUtils.e("getBookReviewComments:" + e.toString());
                }

                @Override
                public void onNext(CommentList list) {
                    mView.showBookReviewComments(list);
                }
            });
    addSubscrebe(rxSubscription);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:24,代码来源:BookReviewDetailPresenter.java

示例7: OnCreateViewHolder

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public BaseViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
    return new BaseViewHolder<CommentList.CommentsBean>(parent, R.layout.item_comment_list) {
        @Override
        public void setData(CommentList.CommentsBean item) {
            if (!SettingManager.getInstance().isNoneCover()) {
                holder.setCircleImageUrl(R.id.ivBookCover, Constant.IMG_BASE_URL + item.author.avatar,
                        R.drawable.avatar_default);
            } else {
                holder.setImageResource(R.id.ivBookCover, R.drawable.avatar_default);
            }

            holder.setText(R.id.tvBookTitle, item.author.nickname)
                    .setText(R.id.tvContent, item.content)
                    .setText(R.id.tvBookType, String.format(mContext.getString(R.string.book_detail_user_lv), item.author.lv))
                    .setText(R.id.tvFloor, String.format(mContext.getString(R.string.comment_floor), item.floor))
                    .setText(R.id.tvTime, FormatUtils.getDescriptionTimeFromDateString(item.created));

            if (item.replyTo == null) {
                holder.setVisible(R.id.tvReplyNickName, false);
                holder.setVisible(R.id.tvReplyFloor, false);
            } else {
                holder.setText(R.id.tvReplyNickName, String.format(mContext.getString(R.string.comment_reply_nickname), item.replyTo.author.nickname))
                        .setText(R.id.tvReplyFloor, String.format(mContext.getString(R.string.comment_reply_floor), item.replyTo.floor));
                holder.setVisible(R.id.tvReplyNickName, true);
                holder.setVisible(R.id.tvReplyFloor, true);
            }
        }
    };
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:31,代码来源:CommentListAdapter.java

示例8: showBestComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void showBestComments(CommentList list) {
    if (list.comments.isEmpty()) {
        gone(headerViewHolder.tvBestComments, headerViewHolder.rvBestComments);
    } else {
        mBestCommentList.addAll(list.comments);
        headerViewHolder.rvBestComments.setHasFixedSize(true);
        headerViewHolder.rvBestComments.setLayoutManager(new LinearLayoutManager(this));
        headerViewHolder.rvBestComments.addItemDecoration(new SupportDividerItemDecoration(mContext, LinearLayoutManager.VERTICAL, true));
        mBestCommentListAdapter = new BestCommentListAdapter(mContext, mBestCommentList);
        mBestCommentListAdapter.setOnItemClickListener(this);
        headerViewHolder.rvBestComments.setAdapter(mBestCommentListAdapter);
        visible(headerViewHolder.tvBestComments, headerViewHolder.rvBestComments);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:BookHelpDetailActivity.java

示例9: showBestComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void showBestComments(CommentList list) {
    if(list.comments.isEmpty()){
        gone(headerViewHolder.tvBestComments, headerViewHolder.rvBestComments);
    }else{
        mBestCommentList.addAll(list.comments);
        headerViewHolder.rvBestComments.setHasFixedSize(true);
        headerViewHolder.rvBestComments.setLayoutManager(new LinearLayoutManager(this));
        headerViewHolder.rvBestComments.addItemDecoration(new SupportDividerItemDecoration(mContext, LinearLayoutManager.VERTICAL, true));
        mBestCommentListAdapter = new BestCommentListAdapter(mContext, mBestCommentList);
        mBestCommentListAdapter.setOnItemClickListener(this);
        headerViewHolder.rvBestComments.setAdapter(mBestCommentListAdapter);
        visible(headerViewHolder.tvBestComments, headerViewHolder.rvBestComments);
    }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:16,代码来源:BookReviewDetailActivity.java

示例10: getBestComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
public Observable<CommentList> getBestComments(String disscussionId) {
    return service.getBestComments(disscussionId);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:BookApi.java

示例11: getBookDisscussionComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
public Observable<CommentList> getBookDisscussionComments(String disscussionId, String start, String limit) {
    return service.getBookDisscussionComments(disscussionId, start, limit);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:BookApi.java

示例12: getBookReviewComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
public Observable<CommentList> getBookReviewComments(String bookReviewId, String start, String limit) {
    return service.getBookReviewComments(bookReviewId, start, limit);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:BookApi.java

示例13: BestCommentListAdapter

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
public BestCommentListAdapter(Context context, List<CommentList.CommentsBean> list) {
    super(context, list, R.layout.item_comment_best_list);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:BestCommentListAdapter.java

示例14: showBookHelpComments

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void showBookHelpComments(CommentList list) {
    mAdapter.addAll(list.comments);
    start = start + list.comments.size();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:6,代码来源:BookHelpDetailActivity.java

示例15: onItemClick

import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void onItemClick(int position) {
    CommentList.CommentsBean data = mAdapter.getItem(position);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:BookHelpDetailActivity.java


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