光环助手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

@ -5,6 +5,7 @@ import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.text.Html;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
@ -271,7 +272,6 @@ public class MessageDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
mContext.getResources().getDisplayMetrics().widthPixels - DisplayUtils.dip2px(mContext, 34));
}
// viewHolder.thumb.setImageURI(mConcernEntity.getGameIcon());
ImageUtils.display(viewHolder.thumb, mConcernEntity.getGameIcon());
viewHolder.title.setText(mConcernEntity.getGameName());
NewsUtils.setNewsPublishOn(viewHolder.time, mConcernEntity.getTime());
@ -369,11 +369,13 @@ public class MessageDetailAdapter extends BaseRecyclerAdapter<ViewHolder> {
return;
}
if (commentEntity.getParent() != null) {
holder.commentContentTv.setText(StringUtils.buildString("回复", 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);
}
CommentUtils.setCommentUserView(mContext, holder, commentEntity);