光环助手V3.5-文章详情优化
This commit is contained in:
@ -3,6 +3,7 @@ package com.gh.gamecenter.adapter;
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.RecyclerView.ViewHolder;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
@ -143,16 +144,20 @@ public class CommentDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
|
||||
private void initCommentViewHolder(final CommentViewHolder holder, int position) {
|
||||
final CommentEntity commentEntity = mCommentList.get(position);
|
||||
|
||||
holder.commentLine.setVisibility(View.GONE);
|
||||
holder.commentLineBottom.setVisibility(View.VISIBLE);
|
||||
holder.commentLine.setVisibility(View.VISIBLE);
|
||||
holder.commentLineBottom.setVisibility(View.GONE);
|
||||
|
||||
CommentUtils.setCommentUserView(mContext, holder, commentEntity);
|
||||
|
||||
CommentUtils.setCommentTime(holder.commentTimeTv, commentEntity.getTime());
|
||||
if (commentEntity.getParent() != null) {
|
||||
holder.commentContentTv.setText("@" + commentEntity.getParent().getUser().getName() + ": " + commentEntity.getContent());
|
||||
|
||||
holder.commentContentTv.setText(commentEntity.getContent());
|
||||
if (commentEntity.getParent() != null && !TextUtils.isEmpty(commentEntity.getParent().getUser().getName())) {
|
||||
holder.quoteContainer.setVisibility(View.VISIBLE);
|
||||
holder.quoteAuthorTv.setText(String.format("@%s", commentEntity.getParent().getUser().getName()));
|
||||
holder.quoteContentTv.setText(commentEntity.getParent().getComment());
|
||||
} else {
|
||||
holder.commentContentTv.setText(commentEntity.getContent());
|
||||
holder.quoteContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
holder.commentLikeIv.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
Reference in New Issue
Block a user