コード例 #1
0
 @Override
 protected void bindData(ItemViewHolder holder, int position) {
   CommentsModel.Comment comment = mDatas.get(position);
   ImageLoader.loadImage(comment.getAvatar(), holder.getImageView(R.id.iv_avatar));
   holder.getTextView(R.id.tv_create_time).setText(comment.getCreateTime());
   holder.getTextView(R.id.tv_username).setText(comment.getUserName());
   holder.getTextView(R.id.tv_rank).setText(comment.getRank());
   ((RichTextView) holder.getTextView(R.id.tv_content)).setRichText(comment.getContent());
 }
コード例 #2
0
 @Override
 protected void bindHeader(HeaderViewHolder holder, int position) {
   super.bindHeader(holder, position);
   if (mTopic != null) {
     ImageLoader.loadImage(mTopic.getAvatarUrl(), holder.getImageView(R.id.iv_avatar));
     holder.getTextView(R.id.tv_username).setText(mTopic.getAuther());
     holder.getTextView(R.id.tv_create_time).setText(mTopic.getStatus());
     holder.getTextView(R.id.tv_title).setText(mTopic.getTitle());
     ((LJWebView) holder.getView(R.id.tv_content)).loadHtml(mTopic.getText());
   }
 }