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


Java CommentList.CommentsBean方法代码示例

本文整理汇总了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);
        }
    });
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:17,代码来源:BestCommentListAdapter.java

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

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

示例4: 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

示例5: onItemClick

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


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