本文整理汇总了Java中com.justwayward.reader.bean.CommentList.CommentsBean方法的典型用法代码示例。如果您正苦于以下问题:Java CommentList.CommentsBean方法的具体用法?Java CommentList.CommentsBean怎么用?Java CommentList.CommentsBean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.justwayward.reader.bean.CommentList
的用法示例。
在下文中一共展示了CommentList.CommentsBean方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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);
}
}
};
}
示例3: 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);
}
示例4: onItemClick
import com.justwayward.reader.bean.CommentList; //导入方法依赖的package包/类
@Override
public void onItemClick(int position) {
CommentList.CommentsBean data = mAdapter.getItem(position);
}
示例5: onItemClick
import com.justwayward.reader.bean.CommentList; //导入方法依赖的package包/类
@Override
public void onItemClick(int position) {
CommentList.CommentsBean data = mAdapter.getItem(position);
}