本文整理汇总了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);
}
});
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
};
}
示例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);
}
}
示例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);
}
}
示例10: getBestComments
import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
public Observable<CommentList> getBestComments(String disscussionId) {
return service.getBestComments(disscussionId);
}
示例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);
}
示例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);
}
示例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);
}
示例14: showBookHelpComments
import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void showBookHelpComments(CommentList list) {
mAdapter.addAll(list.comments);
start = start + list.comments.size();
}
示例15: onItemClick
import com.justwayward.reader.bean.CommentList; //导入依赖的package包/类
@Override
public void onItemClick(int position) {
CommentList.CommentsBean data = mAdapter.getItem(position);
}