From a05b4f7b6574c7fa805ca5ce66bdb0904c8bbe7e Mon Sep 17 00:00:00 2001 From: "kehaoyuan@ghzhushou.com" Date: Tue, 25 Feb 2020 18:10:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80=E4=BF=AE=E6=94=B9=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E7=9B=B8=E5=85=B3=E6=A0=B7=E5=BC=8F=EF=BC=88=E8=B5=84?= =?UTF-8?q?=E8=AE=AF=E6=96=87=E7=AB=A0/=E7=A4=BE=E5=8C=BA/=E8=A7=86?= =?UTF-8?q?=E9=A2=91=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/gh/common/util/CommentHelper.kt | 17 - .../java/com/gh/common/util/CommentUtils.java | 40 +- .../adapter/CommentDetailAdapter.java | 20 +- .../adapter/MessageDetailAdapter.java | 15 +- .../adapter/viewholder/CommentViewHolder.java | 10 +- .../newsdetail/NewsDetailAdapter.java | 15 +- .../answer/CommunityAnswerItemViewHolder.kt | 4 +- .../qa/answer/detail/AnswerDetailFragment.kt | 16 +- .../gamecenter/qa/comment/CommentAdapter.java | 151 ------ .../comment/CommentConversationFragment.java | 100 ---- .../qa/comment/CommentFragment.java | 388 --------------- .../qa/comment/CommentViewModel.java | 125 ----- .../qa/comment/NewCommentAdapter.kt | 15 +- .../res/drawable-xhdpi/vote_icon_select.png | Bin 471 -> 0 bytes .../res/drawable-xhdpi/vote_icon_unselect.png | Bin 536 -> 0 bytes .../drawable-xxhdpi/comment_vote_select.png | Bin 0 -> 1207 bytes .../drawable-xxhdpi/comment_vote_unselect.png | Bin 0 -> 1684 bytes .../community_comment_close.png | Bin 0 -> 764 bytes .../community_comment_more.png | Bin 0 -> 344 bytes ...ommunity_content_detail_collect_select.png | Bin 0 -> 1661 bytes ...munity_content_detail_collect_unselect.png | Bin 0 -> 2714 bytes .../community_content_detail_comment.png | Bin 0 -> 2421 bytes ...community_content_detail_oppose_select.png | Bin 0 -> 1628 bytes ...mmunity_content_detail_oppose_unselect.png | Bin 0 -> 2544 bytes .../community_content_detail_share.png | Bin 0 -> 2656 bytes .../community_content_detail_vote_select.png | Bin 0 -> 1624 bytes ...community_content_detail_vote_unselect.png | Bin 0 -> 2545 bytes .../drawable/community_comment_background.xml | 9 + .../community_comment_reply_background.xml | 9 + ...mmunity_content_detail_vote_background.xml | 9 + app/src/main/res/layout/comment_item.xml | 470 +++++++++--------- app/src/main/res/layout/fragment_comment.xml | 18 +- .../main/res/layout/piece_article_bottom.xml | 51 +- app/src/main/res/values/colors.xml | 1 + 34 files changed, 384 insertions(+), 1099 deletions(-) delete mode 100644 app/src/main/java/com/gh/gamecenter/qa/comment/CommentAdapter.java delete mode 100644 app/src/main/java/com/gh/gamecenter/qa/comment/CommentConversationFragment.java delete mode 100644 app/src/main/java/com/gh/gamecenter/qa/comment/CommentFragment.java delete mode 100644 app/src/main/java/com/gh/gamecenter/qa/comment/CommentViewModel.java delete mode 100644 app/src/main/res/drawable-xhdpi/vote_icon_select.png delete mode 100644 app/src/main/res/drawable-xhdpi/vote_icon_unselect.png create mode 100644 app/src/main/res/drawable-xxhdpi/comment_vote_select.png create mode 100644 app/src/main/res/drawable-xxhdpi/comment_vote_unselect.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_comment_close.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_comment_more.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_content_detail_collect_select.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_content_detail_collect_unselect.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_content_detail_comment.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_content_detail_oppose_select.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_content_detail_oppose_unselect.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_content_detail_share.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_content_detail_vote_select.png create mode 100644 app/src/main/res/drawable-xxhdpi/community_content_detail_vote_unselect.png create mode 100644 app/src/main/res/drawable/community_comment_background.xml create mode 100644 app/src/main/res/drawable/community_comment_reply_background.xml create mode 100644 app/src/main/res/drawable/community_content_detail_vote_background.xml diff --git a/app/src/main/java/com/gh/common/util/CommentHelper.kt b/app/src/main/java/com/gh/common/util/CommentHelper.kt index d47c9ecdfb..8ad268ba3b 100644 --- a/app/src/main/java/com/gh/common/util/CommentHelper.kt +++ b/app/src/main/java/com/gh/common/util/CommentHelper.kt @@ -72,11 +72,6 @@ object CommentHelper { videoId: String? = null, listener: OnCommentCallBackListener? = null) { val dialogOptions = ArrayList() - - if (commentEntity.me == null || !commentEntity.me?.isCommentOwner!!) { - dialogOptions.add("回复") - } - dialogOptions.add("复制") dialogOptions.add("投诉") @@ -97,18 +92,6 @@ object CommentHelper { when (it) { "管理" -> showControlDialog(context, answerId, articleId, communityId, commentEntity, commentEntity.me!!) - "回复" -> { - context.ifLogin("回答详情-评论-回复") { - if (listener != null) { - listener.onCommentCallback(commentEntity) - } else if (!TextUtils.isEmpty(commentEntity.id)) { - context.startActivity(MessageDetailActivity.getMessageDetailIntent(context, commentEntity, commentEntity.id)) - } else { - Utils.toast(context, "缺少关键属性") - } - } - } - "复制" -> copyText(commentEntity.content, context) "投诉" -> { diff --git a/app/src/main/java/com/gh/common/util/CommentUtils.java b/app/src/main/java/com/gh/common/util/CommentUtils.java index 947fa0cba8..9f241c264e 100644 --- a/app/src/main/java/com/gh/common/util/CommentUtils.java +++ b/app/src/main/java/com/gh/common/util/CommentUtils.java @@ -13,9 +13,7 @@ import android.widget.LinearLayout; import android.widget.TextView; import com.gh.gamecenter.CommentDetailActivity; -import com.gh.gamecenter.MessageDetailActivity; import com.gh.gamecenter.R; -import com.gh.gamecenter.adapter.OnCommentCallBackListener; import com.gh.gamecenter.adapter.viewholder.CommentViewHolder; import com.gh.gamecenter.entity.CommentEntity; import com.gh.gamecenter.entity.MeEntity; @@ -85,8 +83,6 @@ public class CommentUtils { public static void showReportDialog(final CommentEntity commentEntity, final Context context, final boolean showConversation, - final OnCommentCallBackListener listener, - final String newsId, final String patch) { final Dialog dialog = new Dialog(context); @@ -96,11 +92,6 @@ public class CommentUtils { container.setPadding(0, DisplayUtils.dip2px(context, 12), 0, DisplayUtils.dip2px(context, 12)); List dialogType = new ArrayList<>(); - - if (commentEntity.getMe() == null || !commentEntity.getMe().isCommentOwner()) { - dialogType.add("回复"); - } - dialogType.add("复制"); dialogType.add("投诉"); @@ -126,17 +117,6 @@ public class CommentUtils { public void onClick(View v) { dialog.cancel(); switch (reportTv.getText().toString()) { - case "回复": - CheckLoginUtils.checkLogin(context, patch + "-回复", () -> { - if (listener != null) { - listener.onCommentCallback(commentEntity); - } else if (!TextUtils.isEmpty(newsId)) { - context.startActivity(MessageDetailActivity.getMessageDetailIntent(context, commentEntity, newsId)); - } else { - Utils.toast(context, "缺少关键属性"); - } - }); - break; case "复制": copyText(commentEntity.getContent(), context); break; @@ -224,7 +204,7 @@ public class CommentUtils { } commentEntity.setVote(commentEntity.getVote() + 1); commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.theme)); - commentLikeIv.setImageResource(R.drawable.vote_icon_select); + commentLikeIv.setImageResource(R.drawable.comment_vote_select); commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote())); commentLikeCountTv.setVisibility(View.VISIBLE); @@ -242,7 +222,7 @@ public class CommentUtils { commentEntity.setVote(commentEntity.getVote() - 1); commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.hint)); - commentLikeIv.setImageResource(R.drawable.vote_icon_unselect); + commentLikeIv.setImageResource(R.drawable.comment_vote_unselect); commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote())); if (commentEntity.getVote() == 0) { commentLikeCountTv.setVisibility(View.GONE); @@ -290,7 +270,7 @@ public class CommentUtils { } commentEntity.setVote(commentEntity.getVote() + 1); commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.theme)); - commentLikeIv.setImageResource(R.drawable.vote_icon_select); + commentLikeIv.setImageResource(R.drawable.comment_vote_select); commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote())); commentLikeCountTv.setVisibility(View.VISIBLE); @@ -307,7 +287,7 @@ public class CommentUtils { public void postFailed(Throwable e) { commentEntity.setVote(commentEntity.getVote() - 1); commentLikeCountTv.setTextColor(ContextCompat.getColor(context, R.color.hint)); - commentLikeIv.setImageResource(R.drawable.vote_icon_unselect); + commentLikeIv.setImageResource(R.drawable.comment_vote_unselect); commentLikeCountTv.setText(NumberUtils.transSimpleCount(commentEntity.getVote())); if (commentEntity.getVote() == 0) { commentLikeCountTv.setVisibility(View.GONE); @@ -340,14 +320,22 @@ public class CommentUtils { public static void setCommentUserView(Context mContext, CommentViewHolder holder, CommentEntity entity) { MeEntity userDataEntity = entity.getMe(); holder.commentLikeCountTv.setTextColor(ContextCompat.getColor(mContext, R.color.hint)); - holder.commentLikeIv.setImageResource(R.drawable.vote_icon_unselect); + holder.commentLikeIv.setImageResource(R.drawable.comment_vote_unselect); + + if (userDataEntity == null || !userDataEntity.isCommentOwner()) { + holder.replyLine.setVisibility(View.VISIBLE); + holder.commentReply.setVisibility(View.VISIBLE); + } else { + holder.replyLine.setVisibility(View.GONE); + holder.commentReply.setVisibility(View.GONE); + } if (entity.getVote() == 0) { holder.commentLikeCountTv.setVisibility(View.GONE); } else { // 检查是否已点赞 if (userDataEntity != null && (userDataEntity.isCommentVoted())) { holder.commentLikeCountTv.setTextColor(ContextCompat.getColor(mContext, R.color.theme)); - holder.commentLikeIv.setImageResource(R.drawable.vote_icon_select); + holder.commentLikeIv.setImageResource(R.drawable.comment_vote_select); } holder.commentLikeCountTv.setVisibility(View.VISIBLE); holder.commentLikeCountTv.setText(NumberUtils.transSimpleCount(entity.getVote())); diff --git a/app/src/main/java/com/gh/gamecenter/adapter/CommentDetailAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/CommentDetailAdapter.java index 67b5252d15..514173086a 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/CommentDetailAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/CommentDetailAdapter.java @@ -12,6 +12,7 @@ import com.gh.common.util.DirectUtils; import com.gh.common.util.ImageUtils; import com.gh.common.util.MtaHelper; import com.gh.common.util.TextHelper; +import com.gh.gamecenter.MessageDetailActivity; import com.gh.gamecenter.R; import com.gh.gamecenter.adapter.viewholder.CommentViewHolder; import com.gh.gamecenter.adapter.viewholder.FooterViewHolder; @@ -149,13 +150,10 @@ public class CommentDetailAdapter extends BaseRecyclerAdapter { private void initCommentViewHolder(final CommentViewHolder holder, int position) { final CommentEntity commentEntity = mCommentList.get(position); - holder.commentLine.setVisibility(View.VISIBLE); - holder.commentLineBottom.setVisibility(View.GONE); - CommentUtils.setCommentUserView(mContext, holder, commentEntity); CommentUtils.setCommentTime(holder.commentTimeTv, commentEntity.getTime()); - + TextHelper.highlightTextThatIsWrappedInsideWrapperByDefault(holder.commentContentTv, commentEntity.getContent()); ArticleCommentParent parent = commentEntity.getParent(); if (parent != null && !TextUtils.isEmpty(parent.getUser().getName())) { @@ -186,10 +184,18 @@ public class CommentDetailAdapter extends BaseRecyclerAdapter { commentEntity, holder.commentLikeCountTv, holder.commentLikeIv, null))); - holder.itemView.setOnClickListener(v -> + holder.commentReply.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + CheckLoginUtils.checkLogin(mContext, "资讯文章-评论-回复", () -> { + mOnCommentCallBackListener.onCommentCallback(commentEntity); + }); + } + }); + + holder.commentMore.setOnClickListener(v -> CommentUtils.showReportDialog(commentEntity, - mContext, false, - mOnCommentCallBackListener, null, "资讯文章-评论")); + mContext, false, "资讯文章-评论")); holder.commentUserIconDv.setOnClickListener(v -> DirectUtils.directToHomeActivity(mContext, commentEntity.getUser().getId(), "", "文章-评论详情")); holder.commentUserNameTv.setOnClickListener(v -> DirectUtils.directToHomeActivity(mContext, commentEntity.getUser().getId(), "", "文章-评论详情")); diff --git a/app/src/main/java/com/gh/gamecenter/adapter/MessageDetailAdapter.java b/app/src/main/java/com/gh/gamecenter/adapter/MessageDetailAdapter.java index 75d05ceaac..e019ef9a47 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/MessageDetailAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/MessageDetailAdapter.java @@ -24,6 +24,7 @@ import com.gh.common.util.NumberUtils; import com.gh.common.util.StringUtils; import com.gh.common.util.TextHelper; import com.gh.common.util.TimestampUtils; +import com.gh.gamecenter.MessageDetailActivity; import com.gh.gamecenter.NewsDetailActivity; import com.gh.gamecenter.R; import com.gh.gamecenter.ShareCardActivity; @@ -410,10 +411,18 @@ public class MessageDetailAdapter extends BaseRecyclerAdapter { }) )); - holder.itemView.setOnClickListener(v -> + holder.commentReply.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + CheckLoginUtils.checkLogin(mContext, "资讯文章详情-评论详情-回复", () -> { + mOnCommentCallBackListener.onCommentCallback(finalCommentEntity); + }); + } + }); + + holder.commentMore.setOnClickListener(v -> CommentUtils.showReportDialog(finalCommentEntity, - mContext, true, - mOnCommentCallBackListener, null, "资讯文章详情-评论详情")); + mContext, true, "资讯文章详情-评论详情")); holder.commentUserNameTv.setOnClickListener(v -> DirectUtils.directToHomeActivity(mContext, finalCommentEntity.getUser().getId(), mEntrance, "文章-评论详情")); holder.commentUserIconDv.setOnClickListener(v -> DirectUtils.directToHomeActivity(mContext, finalCommentEntity.getUser().getId(), mEntrance, "文章-评论详情")); diff --git a/app/src/main/java/com/gh/gamecenter/adapter/viewholder/CommentViewHolder.java b/app/src/main/java/com/gh/gamecenter/adapter/viewholder/CommentViewHolder.java index 4f482485ba..28450cf62c 100644 --- a/app/src/main/java/com/gh/gamecenter/adapter/viewholder/CommentViewHolder.java +++ b/app/src/main/java/com/gh/gamecenter/adapter/viewholder/CommentViewHolder.java @@ -16,8 +16,6 @@ import butterknife.BindView; */ public class CommentViewHolder extends BaseRecyclerViewHolder { - @BindView(R.id.comment_line) - public View commentLine; @BindView(R.id.comment_content) public TextView commentContentTv; @BindView(R.id.comment_like) @@ -34,8 +32,6 @@ public class CommentViewHolder extends BaseRecyclerViewHolder { public TextView commentUserNameTv; @BindView(R.id.comment_author) public TextView commentAuthorTv; - @BindView(R.id.comment_line_bottom) - public View commentLineBottom; @BindView(R.id.comment_badge) public View commentBadge; @@ -52,6 +48,12 @@ public class CommentViewHolder extends BaseRecyclerViewHolder { public TextView badgeNameTv; @BindView(R.id.sdv_quote_author_badge) public SimpleDraweeView quoteAuthorBadgeSdv; + @BindView(R.id.comment_more) + public View commentMore; + @BindView(R.id.comment_reply) + public View commentReply; + @BindView(R.id.reply_dividing_line) + public View replyLine; public CommentViewHolder(View itemView) { super(itemView); diff --git a/app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java b/app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java index 247ca3dde9..8c4bd7ea7d 100644 --- a/app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java +++ b/app/src/main/java/com/gh/gamecenter/newsdetail/NewsDetailAdapter.java @@ -601,10 +601,19 @@ public class NewsDetailAdapter extends BaseRecyclerAdapter { () -> CommentUtils.postVote(mContext, commentEntity, viewHolder.commentLikeCountTv, viewHolder.commentLikeIv, null))); - contentView.setOnClickListener(v -> + + // 资讯文章详情回复 直接跳转至评论详情 + viewHolder.commentReply.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + CheckLoginUtils.checkLogin(mContext, "资讯文章详情-评论-回复", () -> { + mContext.startActivity(MessageDetailActivity.getMessageDetailIntent(mContext, commentEntity, mNewsDetailEntity.getId())); + }); + } + }); + viewHolder.commentMore.setOnClickListener(v -> CommentUtils.showReportDialog(commentEntity, - mContext, true, null, - mNewsDetailEntity.getId(), "资讯文章详情-评论")); + mContext, true, "资讯文章详情-评论")); viewHolder.commentUserNameTv.setOnClickListener(v -> DirectUtils.directToHomeActivity(mContext, commentEntity.getUser().getId(), mEntrance, "文章-评论列表")); viewHolder.commentUserIconDv.setOnClickListener(v -> DirectUtils.directToHomeActivity(mContext, commentEntity.getUser().getId(), mEntrance, "文章-评论列表")); diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt index 8ee241c018..079d89e29d 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/CommunityAnswerItemViewHolder.kt @@ -41,7 +41,7 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B val intent = CommentActivity.getAnswerCommentIntent(itemView.context, entity.id!!, entity.commentCount, - "", true) + "", entity.commentCount == 0) itemView.context.startActivity(intent) } @@ -56,7 +56,7 @@ class CommunityAnswerItemViewHolder(val binding: CommunityAnswerItemBinding) : B val intent = CommentActivity.getArticleCommentIntent(itemView.context, entity.id, entity.count.comment, - "", true, entity.community.name) + "", entity.count.comment == 0, entity.community.name) itemView.context.startActivity(intent) } diff --git a/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt b/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt index 840600b3dd..0b138c1869 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/answer/detail/AnswerDetailFragment.kt @@ -923,12 +923,12 @@ class AnswerDetailFragment : NormalFragment() { private fun updateCollectView(isCollected: Boolean) { if (isCollected) { mBinding.bottomController.tvCollect.text = "已收藏" - mBinding.bottomController.ivCollect.setImageResource(R.drawable.ic_collect_highlighted) + mBinding.bottomController.ivCollect.setImageResource(R.drawable.community_content_detail_collect_select) mBinding.bottomController.tvCollect.setTextColor(ContextCompat.getColor(requireContext(), R.color.theme)) } else { mBinding.bottomController.tvCollect.text = "收藏" - mBinding.bottomController.ivCollect.setImageResource(R.drawable.ic_collect_normal) - mBinding.bottomController.tvCollect.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_3a3a3a)) + mBinding.bottomController.ivCollect.setImageResource(R.drawable.community_content_detail_collect_unselect) + mBinding.bottomController.tvCollect.setTextColor(ContextCompat.getColor(requireContext(), R.color.text_242529)) } } @@ -1142,19 +1142,19 @@ class AnswerDetailFragment : NormalFragment() { private fun updateLikeView(alreadyVoted: Boolean, voteCount: Int) { mBinding.bottomController.tvLike.text = "赞同 ${NumberUtils.transSimpleCount(voteCount)}" if (alreadyVoted) { - mBinding.bottomController.ivLike.setImageResource(R.drawable.ic_like_highlighted) + mBinding.bottomController.ivLike.setImageResource(R.drawable.community_content_detail_vote_select) mBinding.bottomController.tvLike.setTextColor(ContextCompat.getColor(context!!, R.color.theme)) } else { - mBinding.bottomController.ivLike.setImageResource(R.drawable.ic_like_normal) - mBinding.bottomController.tvLike.setTextColor(ContextCompat.getColor(context!!, R.color.text_3a3a3a)) + mBinding.bottomController.ivLike.setImageResource(R.drawable.community_content_detail_vote_unselect) + mBinding.bottomController.tvLike.setTextColor(ContextCompat.getColor(context!!, R.color.text_242529)) } } private fun updateDislikeView(disliked: Boolean) { if (disliked) { - mBinding.bottomController.ivDislike.setImageResource(R.drawable.ic_dislike_highlighted) + mBinding.bottomController.ivDislike.setImageResource(R.drawable.community_content_detail_oppose_select) } else { - mBinding.bottomController.ivDislike.setImageResource(R.drawable.ic_dislike_normal) + mBinding.bottomController.ivDislike.setImageResource(R.drawable.community_content_detail_oppose_unselect) } } diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentAdapter.java b/app/src/main/java/com/gh/gamecenter/qa/comment/CommentAdapter.java deleted file mode 100644 index dd41cdf9be..0000000000 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentAdapter.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.gh.gamecenter.qa.comment; - -import android.content.Context; -import android.text.TextUtils; -import android.view.View; -import android.view.ViewGroup; - -import com.gh.common.constant.ItemViewType; -import com.gh.common.util.CommentHelper; -import com.gh.common.util.CommentUtils; -import com.gh.common.util.DirectUtils; -import com.gh.gamecenter.R; -import com.gh.gamecenter.adapter.OnCommentCallBackListener; -import com.gh.gamecenter.adapter.viewholder.AnswerCommentViewHolder; -import com.gh.gamecenter.adapter.viewholder.FooterViewHolder; -import com.gh.gamecenter.baselist.ListAdapter; -import com.gh.gamecenter.entity.CommentEntity; -import com.gh.gamecenter.entity.CommentParentEntity; - -import androidx.recyclerview.widget.RecyclerView; - -public class CommentAdapter extends ListAdapter { - - private String mEntrance; - private String mAnswerId; - private String mArticleId; - private String mArticleCommunityId; - private boolean mIsShowingConversation; - private OnCommentCallBackListener mOnCommentCallBackListener; - - public CommentAdapter(Context context, String articleId, String articleCommunityId, String answerId - , boolean isShowingConversation, OnCommentCallBackListener commentCallBackListener, String entrance) { - super(context); - mEntrance = entrance; - mAnswerId = answerId; - mArticleId = articleId; - mArticleCommunityId = articleCommunityId; - mIsShowingConversation = isShowingConversation; - mOnCommentCallBackListener = commentCallBackListener; - } - - @Override - public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { - if (viewType == ItemViewType.LOADING) { - View view = mLayoutInflater.inflate(R.layout.refresh_footerview, parent, false); - return new FooterViewHolder(view); - } else { - View view = mLayoutInflater.inflate(R.layout.comment_item, parent, false); - return new AnswerCommentViewHolder(view); - } - } - - @Override - public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { - if (holder instanceof AnswerCommentViewHolder) { - initCommentViewHolder((AnswerCommentViewHolder) holder, position); - } else if (holder instanceof FooterViewHolder) { - initFooterViewHolder((FooterViewHolder) holder); - } - } - - @Override - public int getItemViewType(int position) { - if (position == getItemCount() - 1) { - return ItemViewType.LOADING; - } - - return 100; - } - - @Override - public int getItemCount() { - return mEntityList == null || mEntityList.isEmpty() ? 0 : mEntityList.size() + FOOTER_ITEM_COUNT; - } - - private void initCommentViewHolder(final AnswerCommentViewHolder holder, int position) { - final CommentEntity commentEntity = mEntityList.get(position); - - holder.commentLine.setVisibility(View.GONE); - holder.commentLineBottom.setVisibility(View.VISIBLE); - - CommentUtils.setCommentUserView(mContext, holder, commentEntity); - - CommentUtils.setCommentTime(holder.commentTimeTv, commentEntity.getTime()); - - holder.commentContentTv.setText(commentEntity.getContent()); - - CommentParentEntity parentUser = commentEntity.getParentUser(); - if (parentUser != null && !TextUtils.isEmpty(parentUser.getName())) { - holder.quoteContainer.setVisibility(View.VISIBLE); - holder.quoteAuthorTv.setText(String.format("@%s", parentUser.getName())); - - String comment; - if (parentUser.getActive()) { - comment = parentUser.getComment(); - holder.quoteContentTv.setTextColor(mContext.getResources().getColor(R.color.text_5d5d5d)); - } else { - comment = mContext.getString(R.string.comment_hide_hint); - holder.quoteContentTv.setTextColor(mContext.getResources().getColor(R.color.text_d5d5d5)); - } - holder.quoteContentTv.setText(comment); - } else { - holder.quoteContainer.setVisibility(View.GONE); - } - - holder.commentLikeIv.setOnClickListener(v -> CommentUtils.likeComment(mContext, mAnswerId, mArticleId, - mArticleCommunityId, "",commentEntity, holder.commentLikeCountTv, holder.commentLikeIv, null)); - - holder.itemView.setOnClickListener(v -> { - if (!TextUtils.isEmpty(mArticleId)) { - CommentHelper.showCommunityArticleCommentOptions(mContext, - commentEntity, - mIsShowingConversation, - mArticleId, - mArticleCommunityId, - mOnCommentCallBackListener); - } else { - CommentHelper.showAnswerCommentOptions(mContext, - commentEntity, - mIsShowingConversation, - mAnswerId, - mOnCommentCallBackListener); - } - }); - String path = TextUtils.isEmpty(mAnswerId) ? "回答详情-评论管理" : "社区文章详情-评论管理"; - holder.commentUserIconDv.setOnClickListener(v -> DirectUtils.directToHomeActivity(mContext, commentEntity.getUser().getId(), mEntrance, path)); - holder.commentUserNameTv.setOnClickListener(v -> DirectUtils.directToHomeActivity(mContext, commentEntity.getUser().getId(), mEntrance, path)); - - if (commentEntity.getPriority() != 0) { - holder.commentBadge.setVisibility(View.VISIBLE); - } else { - holder.commentBadge.setVisibility(View.GONE); - } - } - - private void initFooterViewHolder(FooterViewHolder holder) { - if (mIsNetworkError) { - holder.loading.setVisibility(View.GONE); - holder.hint.setText(R.string.loading_error_network); - } else if (!mIsOver) { - holder.hint.setText(R.string.loading); - holder.loading.setVisibility(View.VISIBLE); - } else if (mEntityList.size() == 0) { - holder.loading.setVisibility(View.GONE); - holder.hint.setText(R.string.comment_empty); - } else { - holder.hint.setText(R.string.comment_nomore); - holder.loading.setVisibility(View.GONE); - } - } -} \ No newline at end of file diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentConversationFragment.java b/app/src/main/java/com/gh/gamecenter/qa/comment/CommentConversationFragment.java deleted file mode 100644 index 014cf047b8..0000000000 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentConversationFragment.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.gh.gamecenter.qa.comment; - -import android.annotation.SuppressLint; -import android.app.Application; -import androidx.lifecycle.ViewModelProviders; -import android.os.Bundle; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import android.text.TextUtils; -import android.view.View; -import android.widget.TextView; - -import com.gh.common.util.DirectUtils; -import com.gh.common.util.EntranceUtils; -import com.gh.gamecenter.R; -import com.gh.gamecenter.baselist.ListAdapter; -import com.gh.gamecenter.entity.CommentEntity; -import com.gh.gamecenter.entity.LinkEntity; - -import butterknife.BindView; - -// 评论详情-查看对话 -public class CommentConversationFragment extends CommentFragment { - - @BindView(R.id.answer_comment_content_container) - View commentContainer; - @BindView(R.id.link_tv) - TextView linkTv; - - private String mCommentId; - private String mArticleCommentId; - private LinkEntity mLinkEntity; - - @Override - protected ListAdapter provideListAdapter() { - if (mAdapter == null) { - if (!TextUtils.isEmpty(mAnswerId)) { - mEntrance = "(答案-评论详情-查看对话)"; - } else { - mEntrance = "(文章-评论详情-查看对话)"; - } - mAdapter = new CommentAdapter(getContext(), mArticleId, mCommunityId, - mAnswerId, false, this, mEntrance); - } - return mAdapter; - } - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - mCommentId = getArguments().getString(EntranceUtils.KEY_COMMENTID); - mAnswerId = getArguments().getString(EntranceUtils.KEY_ANSWER_ID); - - mArticleId = getArguments().getString(CommentActivity.ARTICLE_ID); - mArticleCommentId = getArguments().getString(EntranceUtils.KEY_ARTICLE_COMMENT_ID); - mCommunityId = getArguments().getString(CommentActivity.COMMUNITY_ID); - mLinkEntity = getArguments().getParcelable(EntranceUtils.KEY_LINK); - super.onCreate(savedInstanceState); - } - - @SuppressLint("ClickableViewAccessibility") - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - commentContainer.setVisibility(View.GONE); - setNavigationTitle("查看对话"); - - mListRv.setOnTouchListener((v, event) -> { - if (commentContainer.getVisibility() == View.VISIBLE) { - commentContainer.setVisibility(View.GONE); - } - return false; - }); - - if (mLinkEntity != null) { - linkTv.setVisibility(View.VISIBLE); - linkTv.setText((("answer".equals(mLinkEntity.getType()) ? "回答:" : "文章:") + mLinkEntity.getTitle())); - linkTv.setOnClickListener(v -> { - DirectUtils.directToLinkPage(getContext(), mLinkEntity, mEntrance, "查看对话"); - }); - } - } - - @Override - protected int getLayoutId() { - return R.layout.fragment_answer_comment_conversation; - } - - @Override - protected CommentViewModel provideListViewModel() { - return ViewModelProviders.of(this, new CommentViewModel.Factory((Application) getContext().getApplicationContext() - , mAnswerId, mCommentId, mArticleId, mCommunityId, mArticleCommentId)).get(CommentViewModel.class); - } - - @Override - public void onCommentCallback(CommentEntity entity) { - commentContainer.setVisibility(View.VISIBLE); - mCommentEntity = entity; - setSoftInput(true); - } -} diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentFragment.java b/app/src/main/java/com/gh/gamecenter/qa/comment/CommentFragment.java deleted file mode 100644 index 4ac26c571c..0000000000 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentFragment.java +++ /dev/null @@ -1,388 +0,0 @@ -package com.gh.gamecenter.qa.comment; - -import android.annotation.SuppressLint; -import android.app.Activity; -import android.app.Application; -import android.app.Dialog; -import android.content.Context; -import android.os.Bundle; -import android.text.Editable; -import android.text.InputFilter; -import android.text.TextUtils; -import android.text.TextWatcher; -import android.util.DisplayMetrics; -import android.view.View; -import android.view.ViewGroup; -import android.view.inputmethod.InputMethodManager; -import android.widget.EditText; -import android.widget.FrameLayout; -import android.widget.RelativeLayout; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import androidx.core.content.ContextCompat; -import androidx.fragment.app.Fragment; -import androidx.lifecycle.ViewModelProviders; -import androidx.recyclerview.widget.RecyclerView; - -import com.gh.base.fragment.BaseDialogWrapperFragment; -import com.gh.common.util.CheckLoginUtils; -import com.gh.common.util.ClickUtils; -import com.gh.common.util.DialogUtils; -import com.gh.common.util.ErrorHelper; -import com.gh.common.util.KeyboardHeightObserver; -import com.gh.common.util.KeyboardHeightProvider; -import com.gh.common.util.PermissionHelper; -import com.gh.common.util.TextHelper; -import com.gh.common.view.VerticalItemDecoration; -import com.gh.gamecenter.R; -import com.gh.gamecenter.adapter.OnCommentCallBackListener; -import com.gh.gamecenter.baselist.ListAdapter; -import com.gh.gamecenter.baselist.ListFragment; -import com.gh.gamecenter.entity.CommentEntity; -import com.gh.gamecenter.qa.answer.detail.AnswerDetailFragment; -import com.halo.assistant.HaloApp; -import com.lightgame.utils.Util_System_Keyboard; - -import butterknife.BindView; -import butterknife.OnClick; -import butterknife.Optional; -import retrofit2.HttpException; - -public class CommentFragment extends ListFragment implements OnCommentCallBackListener, KeyboardHeightObserver { - - @Nullable - @BindView(R.id.answer_comment_container) - protected View mCommentContainer; - @BindView(R.id.answer_comment_et) - protected EditText mCommentDetailCommentEt; - @BindView(R.id.answer_comment_send_btn) - protected TextView mCommentSend; - @Nullable - @BindView(R.id.answer_comment_dialog_count_tv) - protected TextView mCommentCountTv; - @Nullable - @BindView(R.id.answer_comment_content_container) - View mCommentInputContainer; - - private int mOffset; - protected int mCommentCount; - protected String mAnswerId; - protected String mArticleId; - private String mCommentDraft; - protected String mCommunityId; - - protected boolean mShowSoftKeyboardOnStartUp; - - protected CommentEntity mCommentEntity; // 回复评论的实体 用完马上清空 - protected CommentAdapter mAdapter; - private KeyboardHeightProvider mKeyboardHeightProvider; - private AnswerDetailFragment.CommentListener mCommentListener; - protected Dialog mSendingDialog; - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - mListViewModel.getPostCommentLiveData().observe(this, apiResponse -> { - if (apiResponse == null) return; - - if (apiResponse.getData() != null) { - mSendingDialog.dismiss(); - toast("发表成功"); - mCommentDetailCommentEt.setText(""); - - mCommentCount++; - updateCommentCount(); - onRefresh(); - - if (mCommentListener != null) { - mCommentListener.onCountChange(mCommentCount); - mCommentListener.onCommentDraftChange(""); - } - mCommentDetailCommentEt.postDelayed(() -> setSoftInput(false), 100); - } else if (apiResponse.getHttpException() != null) { - mSendingDialog.dismiss(); - - HttpException exception = apiResponse.getHttpException(); - String errorString = null; - try { - errorString = exception.response().errorBody().string(); - } catch (Exception e1) { - e1.printStackTrace(); - } - ErrorHelper.handleError(requireContext(), errorString, false); - } else { - mSendingDialog.dismiss(); - toast(R.string.post_failure_hint); - } - }); - } - - @SuppressLint("DefaultLocale") - @Override - public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { - super.onViewCreated(view, savedInstanceState); - - mCommentDetailCommentEt.setFocusable(true); - mCommentDetailCommentEt.setFocusableInTouchMode(true); -// mCommentDetailCommentEt.requestFocus(); // 设置后setOnFocusChangeListener无响应 - mCommentDetailCommentEt.addTextChangedListener(watcher); - mCommentDetailCommentEt.setFilters(new InputFilter[]{TextHelper.getFilter(140, "评论不能多于140字")}); - mCommentDetailCommentEt.setText(mCommentDraft); - mCommentDetailCommentEt.setSelection(mCommentDetailCommentEt.getText().length()); - if (mShowSoftKeyboardOnStartUp) { - mCommentDetailCommentEt.postDelayed(() -> { - InputMethodManager keyboard = (InputMethodManager) - HaloApp.getInstance().getApplication().getSystemService(Context.INPUT_METHOD_SERVICE); - keyboard.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); - }, 200); - } else { - mCommentDetailCommentEt.clearFocus(); - mCommentSend.setBackgroundDrawable(getResources().getDrawable(R.drawable.button_gray_style)); - } - - mCommentDetailCommentEt.setOnFocusChangeListener((v, hasFocus) -> { - if (hasFocus) { - mCommentDetailCommentEt.setHintTextColor(ContextCompat.getColor(getContext(), R.color.hint)); - } else { - mCommentDetailCommentEt.setHintTextColor(ContextCompat.getColor(getContext(), R.color.theme)); - } - }); - - updateCommentCount(); - - if (mCommentContainer != null) { - DisplayMetrics displayMetrics = new DisplayMetrics(); - ((Activity) getContext()).getWindowManager().getDefaultDisplay().getMetrics(displayMetrics); - - mCommentContainer.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, displayMetrics.heightPixels * 34 / 55)); - } - - mKeyboardHeightProvider = new KeyboardHeightProvider(getActivity()); - view.post(() -> mKeyboardHeightProvider.start()); - } - - @Override - public void onResume() { - super.onResume(); - // 在查看对话页面不需要手动处理软键盘的高度 - if (!(this instanceof CommentConversationFragment)) { - mKeyboardHeightProvider.setKeyboardHeightObserver(this); - } - } - - @Override - public void onPause() { - super.onPause(); - mKeyboardHeightProvider.setKeyboardHeightObserver(null); - } - - @Override - public void onDestroy() { - super.onDestroy(); - mKeyboardHeightProvider.close(); - } - - private void updateCommentCount() { - if (mCommentCountTv != null) { - mCommentCountTv.setText(String.format("%d条评论", mCommentCount)); - } - } - - @Override - protected RecyclerView.ItemDecoration getItemDecoration() { - return new VerticalItemDecoration(getContext(), 0, true); - } - - @Override - protected CommentViewModel provideListViewModel() { - return ViewModelProviders.of(this, new CommentViewModel.Factory((Application) getContext().getApplicationContext(), - mAnswerId, null, mArticleId, mCommunityId, null)).get(CommentViewModel.class); - } - - @Override - protected ListAdapter provideListAdapter() { - if (mAdapter == null) { - String entrance; - if (!TextUtils.isEmpty(mAnswerId)) { - entrance = "(答案详情-评论列表)"; - } else { - entrance = "(文章详情-评论列表)"; - } - mAdapter = new CommentAdapter(getContext(), mArticleId, mCommunityId, - mAnswerId, true, this, entrance); - } - return mAdapter; - } - - @Override - protected int getLayoutId() { - return R.layout.fragment_answer_comment; - } - - public static CommentFragment getInstance(String answerId, boolean showSoftKeyboardOnStartUp - , int commentCount, String commentDraft, AnswerDetailFragment.CommentListener listener) { - CommentFragment fragment = new CommentFragment(); - fragment.mShowSoftKeyboardOnStartUp = showSoftKeyboardOnStartUp; - fragment.mAnswerId = answerId; - fragment.mCommentCount = commentCount; - fragment.mCommentListener = listener; - fragment.mCommentDraft = commentDraft; - return fragment; - } - - public static CommentFragment getArticleInstance(String articleId - , String articleCommunityId, boolean showSoftKeyboardOnStartUp - , int commentCount, String commentDraft, AnswerDetailFragment.CommentListener listener) { - CommentFragment fragment = new CommentFragment(); - fragment.mShowSoftKeyboardOnStartUp = showSoftKeyboardOnStartUp; - fragment.mArticleId = articleId; - fragment.mCommentCount = commentCount; - fragment.mCommentListener = listener; - fragment.mCommentDraft = commentDraft; - fragment.mCommunityId = articleCommunityId; - return fragment; - } - - private TextWatcher watcher = new TextWatcher() { - @Override - public void beforeTextChanged(CharSequence s, int start, int count, int after) { - } - - @Override - public void onTextChanged(CharSequence s, int start, int before, int count) { - if (s.toString().trim().length() > 0) { - mCommentSend.setEnabled(true); - mCommentSend.setBackgroundDrawable(getResources().getDrawable(R.drawable.button_normal_style)); - } else { - mCommentSend.setEnabled(false); - mCommentSend.setBackgroundDrawable(getResources().getDrawable(R.drawable.button_gray_style)); - } - - if (mCommentListener != null) { - mCommentListener.onCommentDraftChange(mCommentDetailCommentEt.getText().toString()); - } - } - - @Override - public void afterTextChanged(Editable s) { - } - }; - - @Override - public void onCommentCallback(CommentEntity entity) { - mCommentEntity = entity; - setSoftInput(true); - } - - @Optional - @OnClick({ - R.id.answer_comment_container, - R.id.answer_comment_send_btn, - R.id.answer_comment_close_iv, - R.id.answer_comment_title_container}) - public void onClick(View view) { - switch (view.getId()) { - case R.id.answer_comment_send_btn: - if (!ClickUtils.isFastDoubleClick(R.id.answer_comment_send_btn, 5000)) { - String entrance = "回答详情-评论-写评论"; - if (TextUtils.isEmpty(mArticleId)) { - entrance = "社区文章详情-评论-写评论"; - } - CheckLoginUtils.checkLogin(getContext(), entrance, () -> { - PermissionHelper.checkReadPhoneStatePermissionBeforeAction(requireContext(), this::postComment); - }); - } else { - toast("操作太快,慢一点嘛"); - } - break; - case R.id.answer_comment_close_iv: - setSoftInput(false); - Fragment fragment = getParentFragment(); - if (fragment instanceof BaseDialogWrapperFragment) { - ((BaseDialogWrapperFragment) fragment).dismiss(); - } - if (getActivity() instanceof CommentActivity) { - getActivity().finish(); - } - break; - } - } - - private void postComment() { - final String content = mCommentDetailCommentEt.getText().toString(); - - if (content.length() == 0) { - toast("评论内容不能为空!"); - return; - } - - mSendingDialog = DialogUtils.showWaitDialog(getContext(), getString(R.string.post_dialog_hint)); - - if (mCommentEntity != null && mCommentEntity.getId() == null) { - toast("评论异常 id null"); - mSendingDialog.cancel(); - return; - } - - mListViewModel.postComment(content, mCommentEntity); - } - - //软键盘控制 - protected void setSoftInput(boolean isShow) { - if (isShow) { - String entrance; - if (TextUtils.isEmpty(mArticleId)) { - if (mCommentEntity != null) { - entrance = "社区文章详情-评论-写评论"; - } else { - entrance = "社区文章详情-评论-回复"; - } - } else { - if (mCommentEntity != null) { - entrance = "回答详情-评论-写评论"; - } else { - entrance = "回答详情-评论-回复"; - } - } - CheckLoginUtils.checkLogin(getContext(), entrance, () -> { - InputMethodManager keyboard = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE); - keyboard.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); - mCommentDetailCommentEt.setFocusable(true); - mCommentDetailCommentEt.setFocusableInTouchMode(true); - mCommentDetailCommentEt.requestFocus(); - - if (mCommentEntity != null && mCommentEntity.getUser() != null) { - mCommentDetailCommentEt.setHint(getString(R.string.comment_repty_hint, mCommentEntity.getUser().getName())); - } else { - mCommentDetailCommentEt.setHint(getString(R.string.message_detail_comment_hint)); - } - }); - } else { - Util_System_Keyboard.hideSoftKeyboard(getContext(), mCommentDetailCommentEt); - - if (mCommentEntity != null) { - mCommentEntity = null; // 清空当前评论实体 - mCommentDetailCommentEt.setHint(getString(R.string.message_detail_comment_hint)); - mCommentDetailCommentEt.setText(""); - } - } - } - - @Override - public void onKeyboardHeightChanged(int height, int orientation) { - if (mCommentInputContainer != null && mCommentInputContainer.getVisibility() != View.GONE) { - RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) mCommentInputContainer.getLayoutParams(); - if (height > 0) { - lp.bottomMargin = height + mOffset; - } else { - mOffset = Math.abs(height); - lp.bottomMargin = 0; - } - - mCommentInputContainer.setLayoutParams(lp); - } - } -} diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentViewModel.java b/app/src/main/java/com/gh/gamecenter/qa/comment/CommentViewModel.java deleted file mode 100644 index 8fa2f405de..0000000000 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/CommentViewModel.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.gh.gamecenter.qa.comment; - -import android.app.Application; -import androidx.lifecycle.LiveData; -import androidx.lifecycle.MutableLiveData; -import androidx.lifecycle.ViewModel; -import androidx.lifecycle.ViewModelProvider; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import android.text.TextUtils; - -import com.gh.common.util.PostCommentUtils; -import com.gh.gamecenter.baselist.ListViewModel; -import com.gh.gamecenter.entity.CommentEntity; -import com.gh.gamecenter.retrofit.RetrofitManager; -import com.gh.gamecenter.retrofit.service.ApiService; -import com.gh.gamecenter.user.ApiResponse; - -import org.json.JSONException; -import org.json.JSONObject; - -import java.util.List; - -import io.reactivex.Observable; -import retrofit2.HttpException; - -public class CommentViewModel extends ListViewModel { - - private String mAnswerId; - private String mCommentId; - private String mArticleId; - private String mArticleCommentId; - private String mArticleCommunityId; - - private MutableLiveData> mPostCommentLiveData = new MutableLiveData<>(); - - public CommentViewModel(@NonNull Application application, String answerId, @Nullable String commentId - , String articleId, String articleCommunityId, String articleCommentId) { - super(application); - mAnswerId = answerId; - mCommentId = commentId; - mArticleId = articleId; - mArticleCommunityId = articleCommunityId; - mArticleCommentId = articleCommentId; - } - - @Override - public Observable> provideDataObservable(int page) { - ApiService api = RetrofitManager.getInstance(getApplication()).getApi(); - if (!TextUtils.isEmpty(mArticleCommentId)) { - return api.getCommunityArticleCommentConversation(mArticleCommunityId, mArticleId, mArticleCommentId, page); - } else if (!TextUtils.isEmpty(mArticleId)) { - return api.getCommunityArticleCommentList(mArticleCommunityId, mArticleId, page); - } else if (TextUtils.isEmpty(mCommentId)) { - return api.getAnswerCommentList(mAnswerId, page); - } else { - return api.getAnswerCommentConversationList(mAnswerId, mCommentId, page); - } -// return RetrofitManager.getInstance(getApplication()).getApi().getComment("59c0b965e9a64abe2a423544", 0, offset); - } - - public void postComment(String content, CommentEntity commentEntity) { - - JSONObject jsonObject = new JSONObject(); - try { - jsonObject.put("content", content); - } catch (JSONException e) { - e.printStackTrace(); - } - - PostCommentUtils.addAnswerComment(getApplication(), mAnswerId, mArticleId, mArticleCommunityId,jsonObject.toString(), commentEntity, - new PostCommentUtils.PostCommentListener() { - @Override - public void postSuccess(JSONObject response) { - ApiResponse apiResponse = new ApiResponse<>(); - apiResponse.setData(response); - mPostCommentLiveData.postValue(apiResponse); - } - - @Override - public void postFailed(Throwable e) { - ApiResponse apiResponse = new ApiResponse<>(); - if (e instanceof HttpException) { - apiResponse.setHttpException((HttpException) e); - mPostCommentLiveData.postValue(apiResponse); - } else { - mPostCommentLiveData.postValue(apiResponse); - } - } - }); - } - - public LiveData> getPostCommentLiveData() { - return mPostCommentLiveData; - } - - @Override - protected void mergeResultLiveData() { - mResultLiveData.addSource(mListLiveData, mResultLiveData::postValue); - } - - public static class Factory extends ViewModelProvider.NewInstanceFactory { - private Application mApplication; - private String mAnswerId; - private String mCommentId; - private String mArticleId; - private String mArticleCommentId; - private String mArticleCommunityId; - - public Factory(Application application, String answerId, String commentId - , String articleId, String articleCommunityId, String articleCommentId) { - mApplication = application; - mAnswerId = answerId; - mCommentId = commentId; - mArticleId = articleId; - mArticleCommentId = articleCommentId; - mArticleCommunityId = articleCommunityId; - } - - @Override - public T create(Class modelClass) { - return (T) new CommentViewModel(mApplication, mAnswerId, mCommentId, mArticleId, mArticleCommunityId, mArticleCommentId); - } - } -} diff --git a/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentAdapter.kt b/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentAdapter.kt index 08f7cf2fe4..2534282570 100644 --- a/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentAdapter.kt +++ b/app/src/main/java/com/gh/gamecenter/qa/comment/NewCommentAdapter.kt @@ -7,12 +7,14 @@ import android.view.ViewGroup import androidx.recyclerview.widget.RecyclerView import com.gh.common.constant.ItemViewType import com.gh.common.util.* +import com.gh.gamecenter.MessageDetailActivity import com.gh.gamecenter.R import com.gh.gamecenter.adapter.OnCommentCallBackListener import com.gh.gamecenter.adapter.viewholder.AnswerCommentViewHolder import com.gh.gamecenter.adapter.viewholder.FooterViewHolder import com.gh.gamecenter.baselist.ListAdapter import com.gh.gamecenter.entity.CommentEntity +import com.lightgame.utils.Utils class NewCommentAdapter(context: Context, var mViewModel: NewCommentViewModel, @@ -50,12 +52,7 @@ class NewCommentAdapter(context: Context, private fun initCommentViewHolder(holder: AnswerCommentViewHolder, position: Int) { val commentEntity = mEntityList[position] - - holder.commentLine.visibility = View.GONE - holder.commentLineBottom.visibility = View.VISIBLE - CommentUtils.setCommentUserView(mContext, holder, commentEntity) - CommentUtils.setCommentTime(holder.commentTimeTv, commentEntity.time) if (!TextUtils.isEmpty(mViewModel.videoId)) { @@ -123,7 +120,13 @@ class NewCommentAdapter(context: Context, mViewModel.communityId, mViewModel.videoId, commentEntity, holder.commentLikeCountTv, holder.commentLikeIv, null) } - holder.itemView.setOnClickListener { + holder.commentReply.setOnClickListener { + mContext.ifLogin("回答详情-评论-回复") { + mCommentCallBackListener.onCommentCallback(commentEntity) + } + } + + holder.commentMore.setOnClickListener { when (mViewModel.commentType) { CommentType.ANSWER, CommentType.ANSWER_CONVERSATION -> { diff --git a/app/src/main/res/drawable-xhdpi/vote_icon_select.png b/app/src/main/res/drawable-xhdpi/vote_icon_select.png deleted file mode 100644 index 22774bc86e66623826ebbcf28766b55e7ffa71e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 471 zcmV;|0Vw{7P)(K@IdlFm2hN$OT5l?$v$%)Dc!`_1 z16dOP^TVMs)scka8#spB0n$}v0b}@zaZKO~t_4_M00;3QJTK!`c%JG9U>v*U?P)13 zfOia-2>z@P+Y@}NAArlj9~WYWg1_4--~wjx3QL9fnc%D408yBOy||7eA^sh&F^^%K z$D{CW7@vdB<5!!y8(7Secr&Wjo0E8oN}I%=xPpa3>@=QtyE)!qx`Kxtir>Ip`Q#S0 zf=k%np>QN`>l_xMYQ6cpL*gkVdfaYR)Ea38Z*idPp!K9IiMO$ht$_e)jdVo5UYY{| z;6(8CK?7b43UEC5+JD=kllYV+@yEUcYK?RhBUq#S52qKk+VdCCX_9+Zt&tAlVmPjl z@1Q3**CziyHcJ#O9`|7s@A04on8PAwu&a=Kw3pil{gAKqt636%gFnDkSYN|>re6R6 N002ovPDHLkV1iwX)rJ57 diff --git a/app/src/main/res/drawable-xhdpi/vote_icon_unselect.png b/app/src/main/res/drawable-xhdpi/vote_icon_unselect.png deleted file mode 100644 index 91abaf00e6208a1f38b23609db930864413f5fc5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 536 zcmV+z0_XjSP)9=#E2k5zyt&lM9{*o6#fN*aHrSGH1;+^3d=M)*TTX=%M?)? z3lS_L#w1oI7!gI2fVgb3#9fP>ghf{JwJCg?!@Tp}^Sk%J+(~SrvKY_c5sqR8BWVZ^ zHnX;4GefwO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w6{#p_VY2%#jcDomx ulhA*_^%IaEq?5c5{VJx)K$QVU2L1!JnnX+B+h6hk0000NSs54@`8{16 zLo!(3PTk0R$Uwl=aM3rh%!M9@^$Zx9H!|*C;>no1?E}-nc%@6?`!)-B@Et9m81wGk z?eg=}Hs8$XXy8Cc2f|sLd`&1bjqdDdC!H#MV)pW zmC%p9uKI2B-KgD-tzbKuJ^?+qgh-W(2)$2ze~vM>pIN} R?}0(Z;OXk;vd$@?2>>GSi|_yd literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/community_content_detail_collect_select.png b/app/src/main/res/drawable-xxhdpi/community_content_detail_collect_select.png new file mode 100644 index 0000000000000000000000000000000000000000..76b708a4599bc2b146914fd96201524ddc88f6b8 GIT binary patch literal 1661 zcmV-@27>vCP)+oBC4l^5R32ZJURhLR4B&783EPG+I!+KyBKvn}QU)JeXJ^NxR+MIevf4 zmTs8YnK@@>Z_dIndoKU~fB$#>bD243h=O0hK)^u2K=l|9)iYgcId(|iLwUO05R?yx z==YmqGj>KKxbfra-;(j6u43%W>xUYQvXsgnE(C#p(NbXe{JF=J9v zv#H;L3L!yz(*xpD)A9;rR*j%&Qr=4i`bH8(%J~U^c?#40nYj3_Ts^A8GUasoRaO;(F3-~k@I30+Db!t(aV+3n#fo>a*g@H65RI$2fY#iR z9uyNQvZ^u_C8*=5+>l?OvjDqM5%8apR_dO9PRuIGyB4cx7b`4MQiB|JZsW2J*N&&`6>y<#~lJ4vCeE9Ec3v>?2?!2TQ zu-I$y0XrVmC>s%U_xXh2nbDV@F9gMs@4h*Po;p*@O`La?WXd2f6ur;2Ji@&_K zC3G4@rSNo@%Dg1buP9eaDid^9QZ~&S^Z-!( zM~b8^N(g)sLR4K~vO)Y>{NM8*26m{IQ=cKeUwRv6LuKO64X8- zZ#J?t0b+XW6xCxny5aX|?Wd;`;#VvDmIQ&EwZ>JNMC5F<5^jimLBF(Ypx&u|F>mIN z%Dwq$8w=q z6o?*_CqUG$V!Dy;aQ^empeXyE+%kfSMBEUj7Z8RQis?qVvrp`sojOwY%Gnnu3X{}cJ{#yZdU}I*(VmT6ZI6rZo!R_TBysI z89V#n29GO(STT;oos%JVt>6ZbUv(KXV|T0HH9>3uhK`{{4!Jc}t@@0WF{{{DB8Uxb zT21?5*psal72r-~7$akKT7P9dWr9vVFRq|Zn?3=rG*ZnpV`QwV7?cTGGH7)=RTYgN za+(;m2*R}4eR)kMGzb@Ki}-7hx)p-FzOOi^AQAowJ>TCgx4Tit)m|t_8N3C zY7wN{I`-~)Qlokigf&LZN02T?y$F(e{o9lHuv4OmQI8-|`w@f}I$BY#MGyu+t^RG- z_+FIjV$>oCuVA%W#|r{%b!cMLA_xOu%}0NBS_Fs9yoIeAVxwVdSveaZRU&ra~^bG($$Y0j8i%~&_&gM?T6)Ug*;y3 zyWKAnviJ^RWLF3DdT6Tg#TR z%LQ5lu?}oazm9?EJzGP3oJP{u7!$^D)Z|O6(-c;EKvr9JmYxuDiL6Jlr*1nz;EUuu6ejM+ikC)(4NR%j6kiRCfd@6Q3pfccQD4s&$I9l+xYn6QX6C0A75KY@LS9PK> zTCuTt7Kg>ZaC2DP2Uvm1fPsL4fPsL4fPsL4fPsL4MrYt(FO{O3kFU_P00000NkvXX Hu0mjfI&u{L literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/community_content_detail_collect_unselect.png b/app/src/main/res/drawable-xxhdpi/community_content_detail_collect_unselect.png new file mode 100644 index 0000000000000000000000000000000000000000..6852cd6f4f5f92a4168801c7c17adce165f8bf2d GIT binary patch literal 2714 zcmV;L3T5?)P)@6`$EX+i_ag6rb&oG_|4k;k&a_2a{40swRqxo6w*N z#Yvs=@gIc>NF|_DNJajqO%O!|Tmj_|L?~)nIf?+&gs4R%kl;|^;@Y`8-`TVYBuea@ zO&o_fws&XvjnhqM)_d{o<<1|-E1mYeH#2YE`|Zq|&m&~%SwcWYfXd8V(UC}`aKa=_ z)Fhh-;dcZ~AYI(kGM2 z=qsu`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EaPa#c5oY^DG8>)~+Etp;Iba zg!14@i=hY>DdP$V_&8%S#W@aF{tq5k=Z7Yx%9>vI?;(8FK$K6MrnlnQ#KY*ar8*_u zxNr4`Z0d8>A`nm9X0JFM4)dSI+4ckSCZeG&M$J>6B;V3ZHq6_{jVy17SSqED5$=Hqt+|&NQ^%nDhWnj%L!5YQuj8H--$$wEWo+&! zXOT|%on+V}X_e*JDma?WA6;B^4N;-Ea)X26?=sGxkqyY0#>Er-r4NBo+lPx?Z)aRC z&lz0kuHs`X6JH`k>EULhRT}biHY9ePrc8GXB**oGUCu5QODfwFt{){0m3ix7v)+Va4Pm zZ2%s3z)>-*#8<8?e+#Ed(?JUdD^`&O`@Sh4EU$3I@I2_(EMB~mNtv5FS_}=@)RuME z$fmNql%bk3$;02Q6+Y8C7d;RKTG4OtR|PmvuVUytA^&qQQxKN&Eg`UkKw1R;2a1=Y UeYuk$u>b%707*qoM6N<$f*boGUH||9 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/community_content_detail_comment.png b/app/src/main/res/drawable-xxhdpi/community_content_detail_comment.png new file mode 100644 index 0000000000000000000000000000000000000000..b34c5cdfd2729a1293763e7d526f79266b69f779 GIT binary patch literal 2421 zcmV-*35xcKP)RHB@pdQ~?!jTBv{)l}J#DCM_UAL}&}Lnks1sD2>nOv-d8Bh}eyr z4;LH9Is0~}zcIPeqDpZ0{;6QBJw5hzO=hQb%&VN{H z+9#8In#d+Jm7wK!15C9@l}jcxj_U;4}oz55s9q17hT}zE`}Sh;T=NRJ`9v^Zrys@;pXOM)6K5%=FM~2vEvN@ z>lT2r1s=9SDNpH164Gu>CtLril<|>KG7!<|)eB6s?+={tEl%~oeTTu{#i;fuM*jDm zWc={pWwg4w?hA%#JdE_0oywpQ8A8~%Q>nx*r+h!Wl7OhItD8S`KD!TwZFH!_pp5>8 z^0LQu{b;vCe#xwGRqb`uG#*2}8=RCdN`BeYbo>2Y9_LiHXduL_aH8iwd*QMT1qvxW zt})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%E3BLKUo>{nahGDL!TpISPs|BT}TUIPPP^ugoAWTi>Mi*)~4Gz{JFuw!Rb=fS%6@Sz9}ogNr{TXUzsP;T^+%{F`^w4-W){~Ye|F0 z;?bFPs!emA|0e2C0!z57x!`J1v`JAC%y2lmK9|o876l4#N}nA|9{;?;TVzDxnu0zX zSDY*nv|YPqwO!2BY`&#O^!DC)1fc#)5#;=HxRdZ5g|~a>lo@ zR^4ar2?aX|djJQ%Pdcr8ULZtt=Tv5T0JHFoc7*|u9D2=B$}zc$yO11iPL&@VJvQNb zz*>9`{H$ja#p)R)k0z6`hl{k6_q;#|W$`cG>6!fV0OKQ03R?^^l+j(O#BuX6UrEy} zbA+rhF){Jpb=O|=WHy&?#28$Uyaj=ib^rfqIzcsdKS0=BN!^YcCjKYEss3H;+wVaS zQ9Qd!Dt1i={|3O)_c*1?cO?>k$y8ddV<3tZghK0@4I{G=mtr@efA}#^tOPhdfU{ul zD(YX@o6cgMIDs#UxPQh-00000NkvXX Hu0mjfMvT?y literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable/community_comment_background.xml b/app/src/main/res/drawable/community_comment_background.xml new file mode 100644 index 0000000000..836bdfba0f --- /dev/null +++ b/app/src/main/res/drawable/community_comment_background.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/community_comment_reply_background.xml b/app/src/main/res/drawable/community_comment_reply_background.xml new file mode 100644 index 0000000000..dee31678cb --- /dev/null +++ b/app/src/main/res/drawable/community_comment_reply_background.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/community_content_detail_vote_background.xml b/app/src/main/res/drawable/community_content_detail_vote_background.xml new file mode 100644 index 0000000000..da7df63ef9 --- /dev/null +++ b/app/src/main/res/drawable/community_content_detail_vote_background.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/comment_item.xml b/app/src/main/res/layout/comment_item.xml index 0388c2c52c..6617851aab 100644 --- a/app/src/main/res/layout/comment_item.xml +++ b/app/src/main/res/layout/comment_item.xml @@ -5,259 +5,281 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/reuse_listview_item_style" - android:gravity="center_vertical" android:orientation="vertical"> - - - + android:layout_marginLeft="20dp" + android:layout_marginTop="12dp" + android:layout_marginRight="10dp"> + + + + + + + + android:layout_alignTop="@id/comment_icon_container" + android:layout_marginLeft="12dp" + android:layout_marginBottom="12dp" + android:layout_toRightOf="@+id/comment_icon_container"> - - - - - - - - - - - - - - - - - - - + android:layout_marginRight="2dp" + android:layout_toLeftOf="@id/command_container"> - - + android:ellipsize="end" + android:maxLines="1" + android:textColor="@color/text_666666" + android:textSize="12sp" + app:layout_constrainedWidth="true" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@+id/comment_author" + app:layout_constraintHorizontal_bias="0" + app:layout_constraintHorizontal_chainStyle="packed" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:text="孙一峰" /> - + - - + - + + + + + + + + + + + + + + + + android:textColor="@color/text_333333" + android:textSize="14sp" + tools:text="星際爭霸與星際爭霸2的職業選電競戰隊的經理美少女团体星際老男孩成員之一,還在杭州經營水產生意。" /> - + android:layout_below="@+id/comment_content" + android:layout_marginTop="8dp" + android:includeFontPadding="false" + android:textColor="@color/text_999999" + android:textSize="12sp" + tools:text="一个小时前" /> - - + + + - - - - + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_comment.xml b/app/src/main/res/layout/fragment_comment.xml index 93941299bb..1bb34d5e20 100644 --- a/app/src/main/res/layout/fragment_comment.xml +++ b/app/src/main/res/layout/fragment_comment.xml @@ -8,7 +8,7 @@ android:id="@+id/comment_container" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@android:color/white" + android:background="@drawable/community_comment_background" android:orientation="vertical"> + android:src="@drawable/community_comment_close" /> - - diff --git a/app/src/main/res/layout/piece_article_bottom.xml b/app/src/main/res/layout/piece_article_bottom.xml index c912ab423f..2c33d9d5ff 100644 --- a/app/src/main/res/layout/piece_article_bottom.xml +++ b/app/src/main/res/layout/piece_article_bottom.xml @@ -7,8 +7,8 @@ android:layout_width="match_parent" android:layout_height="50dp" android:layout_alignParentBottom="true" - android:clickable="true" - android:background="@android:color/white"> + android:background="@android:color/white" + android:clickable="true"> + android:paddingLeft="12dp" + android:paddingRight="12dp"> + android:src="@drawable/community_content_detail_vote_unselect" /> + android:textColor="@color/text_242529" + android:textSize="11sp" /> @@ -46,7 +46,7 @@ android:layout_centerVertical="true" android:layout_marginLeft="6dp" android:layout_toRightOf="@id/container_like" - android:background="@drawable/round_grey_bg" + android:background="@drawable/community_content_detail_vote_background" android:gravity="center" android:orientation="horizontal" android:paddingLeft="10dp" @@ -56,7 +56,7 @@ android:id="@+id/iv_dislike" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:src="@drawable/ic_dislike_normal" /> + android:src="@drawable/community_content_detail_oppose_unselect" /> @@ -76,30 +76,33 @@ android:layout_marginRight="26dp" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent"> + + android:src="@drawable/community_content_detail_comment" /> + android:paddingTop="4dp" + android:text="评论 0" + android:includeFontPadding="false" + android:textColor="@color/text_242529" + android:textSize="10sp" /> + @@ -107,9 +110,10 @@ android:id="@+id/tv_collect" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingTop="2dp" + android:includeFontPadding="false" + android:paddingTop="4dp" android:text="收藏" - android:textColor="@color/text_3a3a3a" + android:textColor="@color/text_242529" android:textSize="10sp" app:layout_constraintLeft_toLeftOf="@id/iv_collect" app:layout_constraintRight_toRightOf="@id/iv_collect" @@ -120,7 +124,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="32dp" - android:src="@drawable/ic_share" + android:src="@drawable/community_content_detail_share" app:layout_constraintRight_toLeftOf="@id/iv_collect" app:layout_constraintTop_toTopOf="parent" /> @@ -128,9 +132,10 @@ android:id="@+id/tv_share" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:paddingTop="2dp" + android:includeFontPadding="false" + android:paddingTop="4dp" android:text="分享" - android:textColor="@color/text_3a3a3a" + android:textColor="@color/text_242529" android:textSize="10sp" app:layout_constraintLeft_toLeftOf="@id/iv_share" app:layout_constraintRight_toRightOf="@id/iv_share" diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 11459a7ba1..64ccd96233 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -146,4 +146,5 @@ #A1A5B7 #50556B #979A9F + #242529 \ No newline at end of file