光环助手V3.5-文章详情优化

This commit is contained in:
kehaoyuan
2018-09-14 18:22:43 +08:00
parent 275da32584
commit 75c332ade1
19 changed files with 517 additions and 488 deletions

View File

@ -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() {