Просмотр исходного кода

game & article comment ui tune up

billyyoyo лет назад: 5
Родитель
Сommit
9bbfee5983

+ 10 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/UserComment.java

@@ -77,6 +77,8 @@ public class UserComment {
 
     private int update_time;
 
+    private UserCommentReply user_comment_reply;
+
     public void setId(int id) {
         this.id = id;
     }
@@ -238,4 +240,12 @@ public class UserComment {
     public boolean isArticleUserComment() {
         return ApiJSONUtil.COMMENT_TYPE_ARTICLE == app_type;
     }
+
+    public UserCommentReply getUser_comment_reply() {
+        return user_comment_reply;
+    }
+
+    public void setUser_comment_reply(UserCommentReply user_comment_reply) {
+        this.user_comment_reply = user_comment_reply;
+    }
 }

+ 52 - 26
app/src/main/java/com/sheep/gamegroup/model/entity/UserCommentReply.java

@@ -1,7 +1,9 @@
 package com.sheep.gamegroup.model.entity;
 
 
+import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.lqr.emoji.EmotionLayout;
+import com.sheep.gamegroup.util.string.SpannableSb;
 
 /**
  * Created by realicing on 2018/11/2.
@@ -51,81 +53,104 @@ public class UserCommentReply {
 
     private int update_time;
 
-    public void setId(int id){
+    public void setId(int id) {
         this.id = id;
     }
-    public int getId(){
+
+    public int getId() {
         return this.id;
     }
-    public void setUser_comment_id(int user_comment_id){
+
+    public void setUser_comment_id(int user_comment_id) {
         this.user_comment_id = user_comment_id;
     }
-    public int getUser_comment_id(){
+
+    public int getUser_comment_id() {
         return this.user_comment_id;
     }
-    public void setUser_id(int user_id){
+
+    public void setUser_id(int user_id) {
         this.user_id = user_id;
     }
-    public int getUser_id(){
+
+    public int getUser_id() {
         return this.user_id;
     }
-    public void setNickname(String nickname){
+
+    public void setNickname(String nickname) {
         this.nickname = nickname;
     }
-    public String getNickname(){
+
+    public String getNickname() {
         return this.nickname;
     }
-    public void setAvatar(String avatar){
+
+    public void setAvatar(String avatar) {
         this.avatar = avatar;
     }
-    public String getAvatar(){
+
+    public String getAvatar() {
         return this.avatar;
     }
-    public void setLike(int like){
+
+    public void setLike(int like) {
         this.like = like;
     }
-    public int getLike(){
+
+    public int getLike() {
         return this.like;
     }
-    public void setStatus(int status){
+
+    public void setStatus(int status) {
         this.status = status;
     }
-    public int getStatus(){
+
+    public int getStatus() {
         return this.status;
     }
-    public void setContent(String content){
+
+    public void setContent(String content) {
         this.content = content;
     }
-    public String getContent(){
+
+    public String getContent() {
         return this.content;
     }
-    public void setReply(String reply){
+
+    public void setReply(String reply) {
         this.reply = reply;
     }
-    public String getReply(){
+
+    public String getReply() {
         return this.reply;
     }
-    public void setCreate_time(int create_time){
+
+    public void setCreate_time(int create_time) {
         this.create_time = create_time;
     }
-    public int getCreate_time(){
+
+    public int getCreate_time() {
         return this.create_time;
     }
-    public void setUpdate_time(int update_time){
+
+    public void setUpdate_time(int update_time) {
         this.update_time = update_time;
     }
-    public int getUpdate_time(){
+
+    public int getUpdate_time() {
         return this.update_time;
     }
 
 
-
-
+    public CharSequence getSimpleText() {
+        return new SpannableSb().append(nickname + ": ", "#2EBEF2").append(content, "#333333").getSsb();
+    }
 
 
     private ShowAll showAll;
+
     public ShowAll getShowAll() {
-        if(showAll == null) {
+        if (showAll == null) {
             boolean hasExp = EmotionLayout.hasExp(content);
             showAll = new ShowAll(hasExp ? EmotionLayout.changeContent(content) : content);
             showAll.setHasExp(hasExp);
@@ -134,8 +159,9 @@ public class UserCommentReply {
     }
 
     private ShowAll replyShowAll;
+
     public ShowAll getReplyShowAll() {
-        if(replyShowAll == null) {
+        if (replyShowAll == null) {
             boolean hasExp = EmotionLayout.hasExp(reply);
             replyShowAll = new ShowAll(hasExp ? EmotionLayout.changeContent(reply) : reply);
             replyShowAll.setHasExp(hasExp);

+ 89 - 57
app/src/main/java/com/sheep/gamegroup/util/viewHelper/UserCommentHelper.java

@@ -11,6 +11,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserComment;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.ApiUtil;
+import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.TextViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
@@ -51,10 +52,11 @@ public class UserCommentHelper {
     protected ImageView user_comment_detail_user_avatar;
     protected TextView user_comment_detail_user_name;
     protected TextView user_comment_detail_user_publish_time;
+    protected TextView user_comment_detail_user_flag;
     protected AppCompatRatingBar user_comment_detail_user_publish_score;
     protected TextView user_comment_detail_num1;
-    protected TextView user_comment_detail_num2;
-    protected TextView user_comment_detail_num3;
+//    protected TextView user_comment_detail_num2;
+//    protected TextView user_comment_detail_num3;
 
     protected void initView() {
         user_comment_detail_game_name = rootView.findViewById(R.id.user_comment_detail_game_name);
@@ -62,25 +64,35 @@ public class UserCommentHelper {
         user_comment_detail_user_avatar = rootView.findViewById(R.id.user_comment_detail_user_avatar);
         user_comment_detail_user_name = rootView.findViewById(R.id.user_comment_detail_user_name);
         user_comment_detail_user_publish_time = rootView.findViewById(R.id.user_comment_detail_user_publish_time);
+        user_comment_detail_user_flag = rootView.findViewById(R.id.user_comment_detail_user_flag);
         user_comment_detail_user_publish_score = rootView.findViewById(R.id.user_comment_detail_user_publish_score);
         user_comment_detail_num1 = rootView.findViewById(R.id.user_comment_detail_num1);
-        user_comment_detail_num2 = rootView.findViewById(R.id.user_comment_detail_num2);
-        user_comment_detail_num3 = rootView.findViewById(R.id.user_comment_detail_num3);
+//        user_comment_detail_num2 = rootView.findViewById(R.id.user_comment_detail_num2);
+//        user_comment_detail_num3 = rootView.findViewById(R.id.user_comment_detail_num3);
     }
 
     //加载数据
     public void loadHeaderViewData(final UserComment item) {
         user_comment_detail_user_publish_score.setMax(10);
         user_comment_detail_user_publish_score.setProgress(item.getScore());
-        ViewUtil.setText(user_comment_detail_num1, item.getComment());
-        ViewUtil.setText(user_comment_detail_num2, item.getLike());
-        ViewUtil.setText(user_comment_detail_num3, item.getExpression());
+        ViewUtil.setText(user_comment_detail_num1, item.getLike());
+//        ViewUtil.setText(user_comment_detail_num2, item.getLike());
+//        ViewUtil.setText(user_comment_detail_num3, item.getExpression());
         ViewUtil.setText(user_comment_detail_game_name, item.getApp_name());
         ViewUtil.setText(user_comment_detail_user_name, item.getNickname());
         user_comment_detail_user_publish_time.setText(DateUtil.getTimeText(item.getCreate_time()));
         ViewUtil.setGameImage(user_comment_detail_game_icon, item.getApp_icon(), SheepApp.getInstance().getResources().getDimensionPixelSize(R.dimen.content_padding_5));
         ViewUtil.setAvatar(user_comment_detail_user_avatar, item.getAvatar());
         TextViewUtil.initIntroView(rootView, item.getShowAll().setShowAllText("全文"));
+        if(item.getUser_id()==0){
+            ViewUtil.setVisibility(user_comment_detail_user_flag, true);
+            ViewUtil.setText(user_comment_detail_user_flag, "官方");
+        } else if(item.getUser_id() == Integer.parseInt(DataUtil.getInstance().getUserId())){
+            ViewUtil.setVisibility(user_comment_detail_user_flag, true);
+            ViewUtil.setText(user_comment_detail_user_flag, "自己");
+        } else {
+            ViewUtil.setVisibility(user_comment_detail_user_flag, false);
+        }
         user_comment_detail_user_avatar.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
@@ -91,59 +103,79 @@ public class UserCommentHelper {
             user_comment_detail_num1.setOnClickListener(new View.OnClickListener() {
                 @Override
                 public void onClick(View view) {
-                    Jump2View.getInstance().goActAppCommentDetail(item.getId());
-                }
-            });
-        }
-        user_comment_detail_num2.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                ViewUtil.showUpGifDialog(SheepApp.getInstance().getCurrentActivity());
-                user_comment_detail_num2.setEnabled(false);
-                ApiUtil.postGameUserUserGameCommentLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+//                    Jump2View.getInstance().goActAppCommentDetail(item.getId());
+                    ViewUtil.showUpGifDialog(SheepApp.getInstance().getCurrentActivity());
+                    user_comment_detail_num1.setEnabled(false);
+                    ApiUtil.postGameUserUserGameCommentLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
 
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        G.showToast("操作成功");
-                        if(user_comment_detail_num2 != null) {
-                            item.plusLike();
-                            ViewUtil.setText(user_comment_detail_num2, item.getLike());
-                            user_comment_detail_num2.setEnabled(true);
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            G.showToast("操作成功");
+                            if(user_comment_detail_num1 != null) {
+                                item.plusLike();
+                                ViewUtil.setText(user_comment_detail_num1, item.getLike());
+                                user_comment_detail_num1.setEnabled(true);
+                            }
                         }
-                    }
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast("操作失败");
-                        if(user_comment_detail_num2 != null)
-                            user_comment_detail_num2.setEnabled(true);
-                    }
-                });
-            }
-        });
-        user_comment_detail_num3.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                user_comment_detail_num3.setEnabled(false);
-                ApiUtil.postGameUserUserGameCommentExpressionLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        G.showToast("操作成功");
-                        if(user_comment_detail_num3 != null) {
-                            item.plusExpression();
-                            ViewUtil.setText(user_comment_detail_num3, item.getExpression());
-                            user_comment_detail_num3.setEnabled(true);
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            G.showToast("操作失败");
+                            if(user_comment_detail_num1 != null)
+                                user_comment_detail_num1.setEnabled(true);
                         }
-                    }
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast("操作失败");
-                        if(user_comment_detail_num3 != null)
-                            user_comment_detail_num3.setEnabled(true);
-                    }
-                });
-            }
-        });
+                    });
+                }
+            });
+        }
+//        user_comment_detail_num2.setOnClickListener(new View.OnClickListener() {
+//            @Override
+//            public void onClick(View view) {
+//                ViewUtil.showUpGifDialog(SheepApp.getInstance().getCurrentActivity());
+//                user_comment_detail_num2.setEnabled(false);
+//                ApiUtil.postGameUserUserGameCommentLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+//
+//                    @Override
+//                    public void onNext(BaseMessage baseMessage) {
+//                        G.showToast("操作成功");
+//                        if(user_comment_detail_num2 != null) {
+//                            item.plusLike();
+//                            ViewUtil.setText(user_comment_detail_num2, item.getLike());
+//                            user_comment_detail_num2.setEnabled(true);
+//                        }
+//                    }
+//                    @Override
+//                    public void onError(BaseMessage baseMessage) {
+//                        G.showToast("操作失败");
+//                        if(user_comment_detail_num2 != null)
+//                            user_comment_detail_num2.setEnabled(true);
+//                    }
+//                });
+//            }
+//        });
+//        user_comment_detail_num3.setOnClickListener(new View.OnClickListener() {
+//            @Override
+//            public void onClick(View view) {
+//                user_comment_detail_num3.setEnabled(false);
+//                ApiUtil.postGameUserUserGameCommentExpressionLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+//
+//                    @Override
+//                    public void onNext(BaseMessage baseMessage) {
+//                        G.showToast("操作成功");
+//                        if(user_comment_detail_num3 != null) {
+//                            item.plusExpression();
+//                            ViewUtil.setText(user_comment_detail_num3, item.getExpression());
+//                            user_comment_detail_num3.setEnabled(true);
+//                        }
+//                    }
+//                    @Override
+//                    public void onError(BaseMessage baseMessage) {
+//                        G.showToast("操作失败");
+//                        if(user_comment_detail_num3 != null)
+//                            user_comment_detail_num3.setEnabled(true);
+//                    }
+//                });
+//            }
+//        });
     }
 
     public ImageView getUser_comment_detail_game_icon() {

+ 66 - 51
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpArticleComment.java

@@ -11,6 +11,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserComment;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.ApiUtil;
+import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.TextViewUtil;
 import com.sheep.gamegroup.util.TimeUtil;
@@ -33,15 +34,18 @@ public class AdpArticleComment extends BaseQuickAdapter<UserComment, BaseViewHol
     public AdpArticleComment(List<UserComment> list) {
         super(R.layout.item_article_comment, list);
     }
+
     public AdpArticleComment(@LayoutRes int layoutId, List<UserComment> list) {
         super(layoutId, list);
     }
+
     private boolean hasCommentDetail = true;
 
     public AdpArticleComment setHasCommentDetail(boolean hasCommentDetail) {
         this.hasCommentDetail = hasCommentDetail;
         return this;
     }
+
     private int total = 0;
 
     public void setTotal(int total) {
@@ -58,83 +62,94 @@ public class AdpArticleComment extends BaseQuickAdapter<UserComment, BaseViewHol
         ImageView article_comment_user_avatar = helper.itemView.findViewById(R.id.article_comment_user_avatar);
         TextView article_comment_user_name = helper.itemView.findViewById(R.id.article_comment_user_name);
         TextView article_comment_num1 = helper.itemView.findViewById(R.id.article_comment_num1);
-        final TextView article_comment_num2 = helper.itemView.findViewById(R.id.article_comment_num2);
-        final TextView article_comment_num3 = helper.itemView.findViewById(R.id.article_comment_num3);
+//        final TextView article_comment_num2 = helper.itemView.findViewById(R.id.article_comment_num2);
+//        final TextView article_comment_num3 = helper.itemView.findViewById(R.id.article_comment_num3);
         TextView article_comment_time_tv = helper.itemView.findViewById(R.id.article_comment_time_tv);
+        TextView article_comment_user_flag = helper.itemView.findViewById(R.id.article_comment_user_flag);
         View article_comment_line_top = helper.itemView.findViewById(R.id.article_comment_line_top);
         ViewUtil.setVisibility(article_comment_line_top, position != 0);
-        if(item == null){
+        if (item == null) {
             return;
         }
+        if(item.getUser_id()==0){
+            ViewUtil.setVisibility(article_comment_user_flag, true);
+            ViewUtil.setText(article_comment_user_flag, "官方");
+        } else if(item.getUser_id() == Integer.parseInt(DataUtil.getInstance().getUserId())){
+            ViewUtil.setVisibility(article_comment_user_flag, true);
+            ViewUtil.setText(article_comment_user_flag, "自己");
+        } else {
+            ViewUtil.setVisibility(article_comment_user_flag, false);
+        }
         ViewUtil.setAvatar(article_comment_user_avatar, item.getAvatar());
         ViewUtil.setText(article_comment_num1, item.getComment());
-        ViewUtil.setText(article_comment_num2, item.getLike());
-        ViewUtil.setText(article_comment_num3, item.getExpression());
+//        ViewUtil.setText(article_comment_num2, item.getLike());
+//        ViewUtil.setText(article_comment_num3, item.getExpression());
         ViewUtil.setText(article_comment_user_name, item.getNickname());
-        if(total == 0){
-            ViewUtil.setText(article_comment_time_tv, TimeUtil.TimeStamp2Date(item.getCreate_time(), "yyyy-MM-dd\u0020HH:mm"));
-        } else {
-            ViewUtil.setText(article_comment_time_tv, String.format(Locale.CHINA, "%d楼\u3000%s", total - position, TimeUtil.TimeStamp2Date(item.getCreate_time(), "yyyy-MM-dd\u0020HH:mm")));
-        }
+        ViewUtil.setText(article_comment_time_tv, TimeUtil.TimeStamp2Date(item.getCreate_time(), "yyyy-MM-dd\u0020HH:mm"));
+
         //String.format(Locale.CHINA, "%d %d %d %d", position, helper.getAdapterPosition(), helper.getLayoutPosition(), helper.getOldPosition()));
         TextViewUtil.initIntroView(helper.itemView, item.getShowAll());
         ViewUtil.setVisibility(article_comment_num1, hasCommentDetail);
-        if(hasCommentDetail) {
-            article_comment_num1.setOnClickListener(view -> {
-                //跳转评论详情界面
-                Jump2View.getInstance().goActAppCommentDetail(item.getId());
-            });
+        if (hasCommentDetail) {
+            helper.itemView.setOnClickListener(view -> Jump2View.getInstance().goActAppCommentDetail(item.getId()));
         }
 
-        article_comment_num2.setOnClickListener(view -> {
+        View article_comment_reply = helper.itemView.findViewById(R.id.article_comment_reply);
+        if (item.getComment() > 0 && item.getUser_comment_reply() != null) {
+            ViewUtil.setVisibility(article_comment_reply, true);
+            TextView game_app_comment_last_reply = helper.itemView.findViewById(R.id.article_comment_last_reply);
+            TextView game_app_comment_reply_count = helper.itemView.findViewById(R.id.article_comment_reply_count);
+            ViewUtil.setVisibility(game_app_comment_reply_count, item.getComment() > 1);
+            ViewUtil.setText(game_app_comment_last_reply, item.getUser_comment_reply().getSimpleText());
+            ViewUtil.setText(game_app_comment_reply_count, "查看" + item.getComment() + "条回复>");
+        } else {
+            ViewUtil.setVisibility(article_comment_reply, false);
+        }
+
+        article_comment_num1.setOnClickListener(view -> {
             ViewUtil.showUpGifDialog(SheepApp.getInstance().getCurrentActivity());
-            article_comment_num2.setEnabled(false);
+            article_comment_num1.setEnabled(false);
             ApiUtil.postGameUserUserGameCommentLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
 
                 @Override
                 public void onNext(BaseMessage baseMessage) {
                     G.showToast("操作成功");
                     item.plusLike();
-                    ViewUtil.setText(article_comment_num2, item.getLike());
-                    article_comment_num2.setEnabled(true);
+                    ViewUtil.setText(article_comment_num1, item.getLike());
+                    article_comment_num1.setEnabled(true);
                 }
+
                 @Override
                 public void onError(BaseMessage baseMessage) {
                     G.showToast("操作失败");
-                    article_comment_num2.setEnabled(true);
+                    article_comment_num1.setEnabled(true);
                 }
             });
         });
-        if(article_comment_num3 != null) {
-            article_comment_num3.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
-                    article_comment_num3.setEnabled(false);
-                    ApiUtil.postGameUserUserGameCommentExpressionLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-
-                        @Override
-                        public void onNext(BaseMessage baseMessage) {
-                            G.showToast("操作成功");
-                            item.plusExpression();
-                            ViewUtil.setText(article_comment_num3, item.getExpression());
-                            article_comment_num3.setEnabled(true);
-                        }
-
-                        @Override
-                        public void onError(BaseMessage baseMessage) {
-                            G.showToast("操作失败");
-                            article_comment_num3.setEnabled(true);
-                        }
-                    });
-                }
-            });
-        }
-        article_comment_user_avatar.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                //跳转个人游戏主页界面
-                Jump2View.getInstance().goActUserAppHome(view.getContext(), item.getUser_id());
-            }
-        });
+//        if(article_comment_num3 != null) {
+//            article_comment_num3.setOnClickListener(new View.OnClickListener() {
+//                @Override
+//                public void onClick(View view) {
+//                    article_comment_num3.setEnabled(false);
+//                    ApiUtil.postGameUserUserGameCommentExpressionLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+//
+//                        @Override
+//                        public void onNext(BaseMessage baseMessage) {
+//                            G.showToast("操作成功");
+//                            item.plusExpression();
+//                            ViewUtil.setText(article_comment_num3, item.getExpression());
+//                            article_comment_num3.setEnabled(true);
+//                        }
+//
+//                        @Override
+//                        public void onError(BaseMessage baseMessage) {
+//                            G.showToast("操作失败");
+//                            article_comment_num3.setEnabled(true);
+//                        }
+//                    });
+//                }
+//            });
+//        }
+        article_comment_user_avatar.setOnClickListener((view) -> Jump2View.getInstance().goActUserAppHome(view.getContext(), item.getUser_id()));
     }
 }

+ 69 - 61
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppComment.java

@@ -11,6 +11,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserComment;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.ApiUtil;
+import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.TextViewUtil;
 import com.sheep.gamegroup.util.TimeUtil;
@@ -41,15 +42,16 @@ public class AdpGcGameAppComment extends BaseQuickAdapter<UserComment, BaseViewH
     public int getTotal() {
         return total;
     }
+
     @Override
     protected void convert(BaseViewHolder helper, final UserComment item) {
         int position = helper.getAdapterPosition() - getHeaderLayoutCount();
         ImageView game_app_comment_user_avatar = helper.itemView.findViewById(R.id.game_app_comment_user_avatar);
         TextView game_app_comment_user_name = helper.itemView.findViewById(R.id.game_app_comment_user_name);
         AppCompatRatingBar game_app_comment_score = helper.itemView.findViewById(R.id.game_app_comment_score);
-        TextView game_app_comment_num1 = helper.itemView.findViewById(R.id.game_app_comment_num1);
+//        TextView game_app_comment_num1 = helper.itemView.findViewById(R.id.game_app_comment_num1);
         final TextView game_app_comment_num2 = helper.itemView.findViewById(R.id.game_app_comment_num2);
-        final TextView game_app_comment_num3 = helper.itemView.findViewById(R.id.game_app_comment_num3);
+//        final TextView game_app_comment_num3 = helper.itemView.findViewById(R.id.game_app_comment_num3);
         TextView game_app_comment_time_tv = helper.itemView.findViewById(R.id.game_app_comment_time_tv);
         View game_app_comment_line_top = helper.itemView.findViewById(R.id.game_app_comment_line_top);
         ViewUtil.setVisibility(game_app_comment_line_top, position != 0);
@@ -57,13 +59,13 @@ public class AdpGcGameAppComment extends BaseQuickAdapter<UserComment, BaseViewH
             return;
         }
         ViewUtil.setAvatar(game_app_comment_user_avatar, item.getAvatar());
-        ViewUtil.setText(game_app_comment_num1, item.getComment());
+//        ViewUtil.setText(game_app_comment_num1, item.getComment());
         ViewUtil.setText(game_app_comment_num2, item.getLike());
-        ViewUtil.setText(game_app_comment_num3, item.getExpression());
+//        ViewUtil.setText(game_app_comment_num3, item.getExpression());
         game_app_comment_score.setProgress(item.getScore());
         game_app_comment_score.setMax(10);
         ViewUtil.setText(game_app_comment_user_name, item.getNickname());
-        if(total == 0){
+        if (total == 0) {
             ViewUtil.setText(game_app_comment_time_tv, TimeUtil.TimeStamp2Date(item.getCreate_time(), "yyyy-MM-dd\u0020HH:mm"));
         } else {
             ViewUtil.setText(game_app_comment_time_tv, String.format(Locale.CHINA, "%d楼\u3000%s", total - position, TimeUtil.TimeStamp2Date(item.getCreate_time(), "yyyy-MM-dd\u0020HH:mm")));
@@ -71,65 +73,71 @@ public class AdpGcGameAppComment extends BaseQuickAdapter<UserComment, BaseViewH
         //String.format(Locale.CHINA, "%d %d %d %d", position, helper.getAdapterPosition(), helper.getLayoutPosition(), helper.getOldPosition()));
         TextViewUtil.initIntroView(helper.itemView, item.getShowAll());
 
-        game_app_comment_num1.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                //跳转游戏评论详情界面
-                Jump2View.getInstance().goActAppCommentDetail(item.getId());
-            }
-        });
-        game_app_comment_user_avatar.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                //跳转个人游戏主页界面
-                Jump2View.getInstance().goActUserAppHome(view.getContext(), item.getUser_id());
-            }
-        });
-
-        game_app_comment_num2.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                ViewUtil.showUpGifDialog(SheepApp.getInstance().getCurrentActivity());
-                game_app_comment_num2.setEnabled(false);
-                ApiUtil.postGameUserUserGameCommentLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        G.showToast("操作成功");
-                        item.plusLike();
-                        ViewUtil.setText(game_app_comment_num2, item.getLike());
-                        game_app_comment_num2.setEnabled(true);
-                    }
+        helper.itemView.setOnClickListener((view) -> Jump2View.getInstance().goActAppCommentDetail(item.getId()));
+        game_app_comment_user_avatar.setOnClickListener((view) -> Jump2View.getInstance().goActUserAppHome(view.getContext(), item.getUser_id()));
 
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast("操作失败");
-                        game_app_comment_num2.setEnabled(true);
-                    }
-                });
-            }
-        });
-        game_app_comment_num3.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                game_app_comment_num3.setEnabled(false);
-                ApiUtil.postGameUserUserGameCommentExpressionLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+        game_app_comment_num2.setOnClickListener((view) -> {
+            ViewUtil.showUpGifDialog(SheepApp.getInstance().getCurrentActivity());
+            game_app_comment_num2.setEnabled(false);
+            ApiUtil.postGameUserUserGameCommentLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
 
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        G.showToast("操作成功");
-                        item.plusExpression();
-                        ViewUtil.setText(game_app_comment_num3, item.getExpression());
-                        game_app_comment_num3.setEnabled(true);
-                    }
+                @Override
+                public void onNext(BaseMessage baseMessage) {
+                    G.showToast("操作成功");
+                    item.plusLike();
+                    ViewUtil.setText(game_app_comment_num2, item.getLike());
+                    game_app_comment_num2.setEnabled(true);
+                }
 
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast("操作失败");
-                        game_app_comment_num3.setEnabled(true);
-                    }
-                });
-            }
+                @Override
+                public void onError(BaseMessage baseMessage) {
+                    G.showToast("操作失败");
+                    game_app_comment_num2.setEnabled(true);
+                }
+            });
         });
+        View game_app_comment_reply = helper.itemView.findViewById(R.id.game_app_comment_reply);
+        if (item.getComment() > 0 && item.getUser_comment_reply() != null) {
+            ViewUtil.setVisibility(game_app_comment_reply, true);
+            TextView game_app_comment_last_reply = helper.itemView.findViewById(R.id.game_app_comment_last_reply);
+            TextView game_app_comment_reply_count = helper.itemView.findViewById(R.id.game_app_comment_reply_count);
+            ViewUtil.setVisibility(game_app_comment_reply_count, item.getComment() > 1);
+            ViewUtil.setText(game_app_comment_last_reply, item.getUser_comment_reply().getSimpleText());
+            ViewUtil.setText(game_app_comment_reply_count, "查看" + item.getComment() + "条回复>");
+        } else {
+            ViewUtil.setVisibility(game_app_comment_reply, false);
+        }
+        TextView game_app_comment_user_flag = helper.itemView.findViewById(R.id.game_app_comment_user_flag);
+        if(item.getUser_id()==0){
+            ViewUtil.setVisibility(game_app_comment_user_flag, true);
+            ViewUtil.setText(game_app_comment_user_flag, "官方");
+        } else if(item.getUser_id() == Integer.parseInt(DataUtil.getInstance().getUserId())){
+            ViewUtil.setVisibility(game_app_comment_user_flag, true);
+            ViewUtil.setText(game_app_comment_user_flag, "自己");
+        } else {
+            ViewUtil.setVisibility(game_app_comment_user_flag, false);
+        }
+//        game_app_comment_num3.setOnClickListener(new View.OnClickListener() {
+//            @Override
+//            public void onClick(View view) {
+//                game_app_comment_num3.setEnabled(false);
+//                ApiUtil.postGameUserUserGameCommentExpressionLike(item.getId(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+//
+//                    @Override
+//                    public void onNext(BaseMessage baseMessage) {
+//                        G.showToast("操作成功");
+//                        item.plusExpression();
+//                        ViewUtil.setText(game_app_comment_num3, item.getExpression());
+//                        game_app_comment_num3.setEnabled(true);
+//                    }
+//
+//                    @Override
+//                    public void onError(BaseMessage baseMessage) {
+//                        G.showToast("操作失败");
+//                        game_app_comment_num3.setEnabled(true);
+//                    }
+//                });
+//            }
+//        });
     }
 }

+ 22 - 10
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpUserCommentReply.java

@@ -8,6 +8,7 @@ import android.widget.TextView;
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
 import com.lqr.emoji.EmotionLayout;
+import com.sheep.gamegroup.dateview.DateUtil;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.ShowAll;
 import com.sheep.gamegroup.model.entity.UserComment;
@@ -36,16 +37,18 @@ public class AdpUserCommentReply extends BaseQuickAdapter<UserCommentReply, Base
     public AdpUserCommentReply(List<UserCommentReply> list) {
         super(R.layout.item_user_comment_reply, list);
     }
+
     private UserComment userComment;
     private boolean isMe;//是否是我的评论详情,我的评论详情中,列表里面显示回复图标,并可点击进行回复
 
 
     public void setUserComment(UserComment userComment) {
         this.userComment = userComment;
-        if(userComment != null){
+        if (userComment != null) {
             isMe = TextUtils.equals(String.valueOf(userComment.getUser_id()), DataUtil.getInstance().getUserId());
         }
     }
+
     //点击回复图标的回调
     private Action1<UserCommentReply> action1;
 
@@ -62,23 +65,31 @@ public class AdpUserCommentReply extends BaseQuickAdapter<UserCommentReply, Base
         final TextView game_app_comment_num2 = helper.itemView.findViewById(R.id.game_app_comment_num2);
         View game_app_comment_line_bottom = helper.itemView.findViewById(R.id.game_app_comment_line_bottom);
         TextView user_comment_reply_content = helper.itemView.findViewById(R.id.user_comment_reply_content);
+        TextView game_app_comment_publish_time = helper.itemView.findViewById(R.id.game_app_comment_publish_time);
+        TextView game_app_comment_user_flag = helper.itemView.findViewById(R.id.game_app_comment_user_flag);
         View game_app_comment_line_top = helper.itemView.findViewById(R.id.game_app_comment_line_top);
         ViewUtil.setVisibility(game_app_comment_line_top, position != 0);
-        if(item == null)
+        if (item == null)
             return;
         //自己回复自己的评论
         boolean replyUserIsCommentUser = userComment == null || userComment.getUser_id() == item.getUser_id();
-        if(replyUserIsCommentUser){
-            ViewUtil.setText(game_app_comment_user_name, item.getNickname());
-        } else {
-            ViewUtil.setText(game_app_comment_user_name, String.format(Locale.CHINA, "%s 回复 %s", item.getNickname(), userComment.getNickname()));
-        }
+        ViewUtil.setText(game_app_comment_user_name, item.getNickname());
         ViewUtil.setAvatar(game_app_comment_user_avatar, item.getAvatar());
         ViewUtil.setText(game_app_comment_num2, item.getLike());
-        ViewUtil.setVisibility(game_app_comment_num1, isMe && !replyUserIsCommentUser && TextUtils.isEmpty(item.getReply()));//自己在自己的评论详情中,别人的评论下才显示回复图标,但是如果已经回复了,就不显示
+        ViewUtil.setVisibility(game_app_comment_num1, false);//自己在自己的评论详情中,别人的评论下才显示回复图标,但是如果已经回复了,就不显示
         ViewUtil.setVisibility(game_app_comment_line_bottom, !TextUtils.isEmpty(item.getReply()));
         ViewUtil.setVisibility(user_comment_reply_content, !TextUtils.isEmpty(item.getReply()));
-        if(item.getReplyShowAll().isHasExp())
+        ViewUtil.setText(game_app_comment_publish_time, DateUtil.getTimeText(item.getCreate_time()));
+        if(item.getUser_id()==0){
+            ViewUtil.setVisibility(game_app_comment_user_flag, true);
+            ViewUtil.setText(game_app_comment_user_flag, "官方");
+        } else if(item.getUser_id() == Integer.parseInt(DataUtil.getInstance().getUserId())){
+            ViewUtil.setVisibility(game_app_comment_user_flag, true);
+            ViewUtil.setText(game_app_comment_user_flag, "自己");
+        } else {
+            ViewUtil.setVisibility(game_app_comment_user_flag, false);
+        }
+        if (item.getReplyShowAll().isHasExp())
             ViewUtil.setH5ImgText(user_comment_reply_content, item.getReplyShowAll().getContent(), G.WIDTH - G.getRealPix(50));
         else
             ViewUtil.setText(user_comment_reply_content, item.getReply());
@@ -86,7 +97,7 @@ public class AdpUserCommentReply extends BaseQuickAdapter<UserCommentReply, Base
         game_app_comment_num1.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                if(action1 != null)
+                if (action1 != null)
                     action1.call(item);
             }
         });
@@ -104,6 +115,7 @@ public class AdpUserCommentReply extends BaseQuickAdapter<UserCommentReply, Base
                         ViewUtil.setText(game_app_comment_num2, item.getLike());
                         game_app_comment_num2.setEnabled(true);
                     }
+
                     @Override
                     public void onError(BaseMessage baseMessage) {
                         G.showToast("操作失败");

+ 77 - 71
app/src/main/res/layout/header_user_comment_detail.xml

@@ -8,7 +8,7 @@
     <View
         android:id="@+id/user_comment_detail_line1"
         android:layout_width="match_parent"
-        android:layout_height="10dp"
+        android:layout_height="1dp"
         android:background="#f5f5f5" />
 
     <LinearLayout
@@ -48,83 +48,90 @@
     <View
         android:id="@+id/user_comment_detail_line2"
         android:layout_width="match_parent"
-        android:layout_height="10dp"
+        android:layout_height="1dp"
         android:background="#f5f5f5" />
 
-    <RelativeLayout
+    <android.support.constraint.ConstraintLayout
         android:layout_width="match_parent"
-        android:layout_height="wrap_content">
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginTop="17dp"
+        android:layout_marginEnd="16dp"
+        android:layout_marginBottom="20dp">
 
         <ImageView
             android:id="@+id/user_comment_detail_user_avatar"
             android:layout_width="25dp"
             android:layout_height="25dp"
-            android:layout_marginStart="16dp"
-            android:layout_marginTop="20dp"
-            android:src="@drawable/icon" />
+            android:src="@drawable/icon"
+            app:layout_constraintLeft_toLeftOf="parent"
+            app:layout_constraintTop_toTopOf="parent"/>
 
         <TextView
             android:id="@+id/user_comment_detail_user_name"
-            android:layout_width="match_parent"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginStart="50dp"
-            android:layout_marginTop="18dp"
-            android:layout_marginEnd="36dp"
+            android:layout_marginLeft="8dp"
+            app:layout_constraintTop_toTopOf="@+id/user_comment_detail_user_avatar"
+            app:layout_constraintLeft_toRightOf="@+id/user_comment_detail_user_avatar"
             android:text="栗子的菜"
             android:textColor="#ff333333"
             android:textSize="13sp" />
 
         <TextView
+            android:id="@+id/user_comment_detail_user_flag"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="16dp"
+            android:layout_marginEnd="16dp"
+            android:padding="2dp"
+            android:text="官方"
+            android:textColor="@color/blue_end"
+            android:textSize="10sp"
+            android:background="@drawable/shape_blue_stroke_rectangle_3_radius"
+            app:layout_constraintStart_toEndOf="@id/user_comment_detail_user_name"
+            app:layout_constraintBottom_toBottomOf="@id/user_comment_detail_user_name"
+            app:layout_constraintTop_toTopOf="@id/user_comment_detail_user_name" />
+
+        <TextView
             android:id="@+id/user_comment_detail_user_publish_time"
-            android:layout_width="match_parent"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_below="@id/user_comment_detail_user_name"
-            android:layout_marginStart="50dp"
-            android:layout_marginTop="10dp"
-            android:layout_marginEnd="36dp"
             android:text="昨天"
             android:textColor="#ffcccccc"
-            android:textSize="10sp" />
-    </RelativeLayout>
-
-    <android.support.constraint.ConstraintLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="16dp"
-        android:layout_marginTop="17dp"
-        android:layout_marginEnd="16dp"
-        android:layout_marginBottom="20dp"
-        android:background="@drawable/shape_f5_solid_rectangle_5">
+            android:textSize="11sp"
+            app:layout_constraintLeft_toLeftOf="@+id/user_comment_detail_user_name"
+            app:layout_constraintBottom_toBottomOf="@+id/user_comment_detail_num1"
+            app:layout_constraintTop_toTopOf="@+id/user_comment_detail_num1"/>
 
         <android.support.v7.widget.AppCompatRatingBar
             android:id="@+id/user_comment_detail_user_publish_score"
             style="@style/style_rating_bar"
             android:layout_width="wrap_content"
-            android:layout_marginStart="17dp"
-            android:layout_marginTop="20dp"
+            android:layout_marginTop="6dp"
             android:isIndicator="true"
             android:numStars="5"
             android:rating="0"
             android:stepSize="0.5"
-            app:layout_constraintStart_toStartOf="parent"
-            app:layout_constraintTop_toTopOf="parent" />
+            app:layout_constraintStart_toStartOf="@+id/user_comment_detail_user_name"
+            app:layout_constraintTop_toBottomOf="@+id/user_comment_detail_user_name" />
 
 
         <TextView
             android:id="@+id/intro_content"
-            android:layout_width="match_parent"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:ellipsize="end"
             android:lineSpacingMultiplier="1.3"
             android:maxLines="3"
-            android:paddingStart="18dp"
-            android:paddingTop="20dp"
-            android:paddingEnd="50dp"
+            android:paddingTop="8dp"
             android:paddingBottom="10dp"
             android:text="《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。"
             android:textColor="#ff666666"
             android:textSize="12sp"
-            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="@+id/user_comment_detail_user_name"
             app:layout_constraintTop_toBottomOf="@id/user_comment_detail_user_publish_score" />
 
         <TextView
@@ -132,19 +139,18 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_marginEnd="10dp"
-            android:padding="10dp"
             android:text="全文"
             android:textColor="#ff4bc1ff"
             android:textSize="12sp"
             android:visibility="visible"
-            app:layout_constraintBottom_toBottomOf="@id/intro_content"
+            app:layout_constraintTop_toBottomOf="@id/intro_content"
             app:layout_constraintEnd_toEndOf="parent" />
 
         <TextView
             android:id="@+id/user_comment_detail_num1"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:drawableStart="@drawable/ic_but_speak"
+            android:drawableStart="@drawable/ic_but_up"
             android:drawablePadding="6dp"
             android:paddingStart="8dp"
             android:paddingTop="8dp"
@@ -155,39 +161,39 @@
             android:textSize="11sp"
             app:layout_constraintBottom_toBottomOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
-            app:layout_constraintTop_toBottomOf="@id/intro_content" />
-
-        <TextView
-            android:id="@+id/user_comment_detail_num2"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:drawableStart="@drawable/ic_but_up"
-            android:drawablePadding="6dp"
-            android:paddingStart="8dp"
-            android:paddingTop="8dp"
-            android:paddingEnd="8dp"
-            android:paddingBottom="16dp"
-            android:text="54"
-            android:textColor="#ff666666"
-            android:textSize="11sp"
-            app:layout_constraintBottom_toBottomOf="@id/user_comment_detail_num1"
-            app:layout_constraintEnd_toStartOf="@id/user_comment_detail_num1" />
-
-        <TextView
-            android:id="@+id/user_comment_detail_num3"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:drawableStart="@drawable/ic_image_xiao"
-            android:drawablePadding="6dp"
-            android:paddingStart="8dp"
-            android:paddingTop="8dp"
-            android:paddingEnd="8dp"
-            android:paddingBottom="16dp"
-            android:text="54"
-            android:textColor="#ff666666"
-            android:textSize="11sp"
-            app:layout_constraintBottom_toBottomOf="@id/user_comment_detail_num1"
-            app:layout_constraintEnd_toStartOf="@id/user_comment_detail_num2" />
+            app:layout_constraintTop_toBottomOf="@id/intro_show_all" />
+
+        <!--<TextView-->
+            <!--android:id="@+id/user_comment_detail_num2"-->
+            <!--android:layout_width="wrap_content"-->
+            <!--android:layout_height="wrap_content"-->
+            <!--android:drawableStart="@drawable/ic_but_up"-->
+            <!--android:drawablePadding="6dp"-->
+            <!--android:paddingStart="8dp"-->
+            <!--android:paddingTop="8dp"-->
+            <!--android:paddingEnd="8dp"-->
+            <!--android:paddingBottom="16dp"-->
+            <!--android:text="54"-->
+            <!--android:textColor="#ff666666"-->
+            <!--android:textSize="11sp"-->
+            <!--app:layout_constraintBottom_toBottomOf="@id/user_comment_detail_num1"-->
+            <!--app:layout_constraintEnd_toStartOf="@id/user_comment_detail_num1" />-->
+
+        <!--<TextView-->
+            <!--android:id="@+id/user_comment_detail_num3"-->
+            <!--android:layout_width="wrap_content"-->
+            <!--android:layout_height="wrap_content"-->
+            <!--android:drawableStart="@drawable/ic_image_xiao"-->
+            <!--android:drawablePadding="6dp"-->
+            <!--android:paddingStart="8dp"-->
+            <!--android:paddingTop="8dp"-->
+            <!--android:paddingEnd="8dp"-->
+            <!--android:paddingBottom="16dp"-->
+            <!--android:text="54"-->
+            <!--android:textColor="#ff666666"-->
+            <!--android:textSize="11sp"-->
+            <!--app:layout_constraintBottom_toBottomOf="@id/user_comment_detail_num1"-->
+            <!--app:layout_constraintEnd_toStartOf="@id/user_comment_detail_num2" />-->
     </android.support.constraint.ConstraintLayout>
 
     <View

+ 1 - 1
app/src/main/res/layout/include_total_count_tv.xml

@@ -5,7 +5,7 @@
     android:layout_height="wrap_content"
     android:paddingStart="16dp"
     android:paddingEnd="16dp"
-    android:text="@string/total_x_comment"
+    android:text="@string/total_x_reply"
     android:textColor="#ff333333"
     android:textSize="13sp"
     android:textStyle="bold" />

+ 103 - 44
app/src/main/res/layout/item_article_comment.xml

@@ -32,26 +32,40 @@
         android:text="栗子的菜"
         android:textColor="#ff333333"
         android:textSize="13sp"
-        app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toEndOf="@id/article_comment_user_avatar"
-        app:layout_constraintTop_toTopOf="@id/article_comment_user_avatar"
-        app:layout_constraintBottom_toBottomOf="@id/article_comment_user_avatar"/>
+        app:layout_constraintTop_toTopOf="@id/article_comment_user_avatar"/>
+
+    <TextView
+        android:id="@+id/article_comment_user_flag"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:padding="2dp"
+        android:text="官方"
+        android:textColor="@color/blue_end"
+        android:textSize="10sp"
+        android:background="@drawable/shape_blue_stroke_rectangle_3_radius"
+        app:layout_constraintStart_toEndOf="@id/article_comment_user_name"
+        app:layout_constraintBottom_toBottomOf="@id/article_comment_user_name"
+        app:layout_constraintTop_toTopOf="@id/article_comment_user_name" />
 
     <TextView
         android:id="@+id/intro_content"
-        android:layout_width="match_parent"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:ellipsize="end"
+        android:layout_marginTop="8dp"
         android:lineSpacingMultiplier="1.3"
         android:maxLines="3"
-        android:paddingStart="16dp"
-        android:paddingTop="13dp"
         android:paddingEnd="16dp"
         android:paddingBottom="10dp"
         android:text="《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。"
         android:textColor="#ff666666"
         android:textSize="12sp"
-        app:layout_constraintTop_toBottomOf="@id/article_comment_user_avatar" />
+        app:layout_constraintLeft_toLeftOf="@id/article_comment_user_name"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/article_comment_user_name" />
 
     <TextView
         android:id="@+id/intro_show_all"
@@ -72,12 +86,10 @@
         android:layout_height="wrap_content"
         android:layout_marginEnd="10dp"
         android:layout_marginBottom="6dp"
-        android:drawableStart="@drawable/ic_but_speak"
+        android:drawableStart="@drawable/ic_but_up"
         android:drawablePadding="6dp"
         android:paddingStart="8dp"
-        android:paddingTop="14dp"
         android:paddingEnd="8dp"
-        android:paddingBottom="14dp"
         android:text="54"
         android:textColor="#ff666666"
         android:textSize="11sp"
@@ -85,48 +97,95 @@
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintTop_toBottomOf="@id/intro_show_all" />
 
-    <TextView
-        android:id="@+id/article_comment_num2"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:drawableStart="@drawable/ic_but_up"
-        android:drawablePadding="6dp"
-        android:paddingStart="8dp"
-        android:paddingTop="14dp"
-        android:paddingEnd="8dp"
-        android:paddingBottom="14dp"
-        android:text="54"
-        android:textColor="#ff666666"
-        android:textSize="11sp"
-        app:layout_constraintEnd_toStartOf="@id/article_comment_num1"
-        app:layout_constraintTop_toTopOf="@id/article_comment_num1" />
+    <!--<TextView-->
+        <!--android:id="@+id/article_comment_num2"-->
+        <!--android:layout_width="wrap_content"-->
+        <!--android:layout_height="wrap_content"-->
+        <!--android:drawableStart="@drawable/ic_but_up"-->
+        <!--android:drawablePadding="6dp"-->
+        <!--android:paddingStart="8dp"-->
+        <!--android:paddingEnd="8dp"-->
+        <!--android:text="54"-->
+        <!--android:textColor="#ff666666"-->
+        <!--android:textSize="11sp"-->
+        <!--app:layout_constraintEnd_toStartOf="@id/article_comment_num1"-->
+        <!--app:layout_constraintTop_toTopOf="@id/article_comment_num1" />-->
 
-    <TextView
-        android:id="@+id/article_comment_num3"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:drawableStart="@drawable/ic_image_xiao"
-        android:drawablePadding="6dp"
-        android:paddingStart="8dp"
-        android:paddingTop="14dp"
-        android:paddingEnd="8dp"
-        android:paddingBottom="14dp"
-        android:text="54"
-        android:textColor="#ff666666"
-        android:textSize="11sp"
-        app:layout_constraintEnd_toStartOf="@id/article_comment_num2"
-        app:layout_constraintTop_toTopOf="@id/article_comment_num1" />
+    <!--<TextView-->
+        <!--android:id="@+id/article_comment_num3"-->
+        <!--android:layout_width="wrap_content"-->
+        <!--android:layout_height="wrap_content"-->
+        <!--android:drawableStart="@drawable/ic_image_xiao"-->
+        <!--android:drawablePadding="6dp"-->
+        <!--android:paddingStart="8dp"-->
+        <!--android:paddingTop="14dp"-->
+        <!--android:paddingEnd="8dp"-->
+        <!--android:paddingBottom="14dp"-->
+        <!--android:text="54"-->
+        <!--android:textColor="#ff666666"-->
+        <!--android:textSize="11sp"-->
+        <!--app:layout_constraintEnd_toStartOf="@id/article_comment_num2"-->
+        <!--app:layout_constraintTop_toTopOf="@id/article_comment_num1" />-->
 
     <TextView
         android:id="@+id/article_comment_time_tv"
         android:layout_width="wrap_content"
         android:layout_height="0dp"
-        android:paddingStart="16dp"
-        android:paddingEnd="16dp"
-        android:textSize="7sp"
-        android:textColor="#ff666666"
+        android:textSize="11sp"
+        android:textColor="#999999"
         android:gravity="center_vertical"
         android:text="@string/app_name"
+        app:layout_constraintLeft_toLeftOf="@+id/article_comment_user_name"
         app:layout_constraintBottom_toBottomOf="@id/article_comment_num1"
         app:layout_constraintTop_toTopOf="@id/article_comment_num1"/>
+
+    <TextView
+        android:id="@+id/game_app_comment_reply_btn"
+        android:text="回复"
+        android:textColor="#666666"
+        android:textSize="10sp"
+        android:paddingLeft="8dp"
+        android:paddingRight="8dp"
+        android:paddingTop="2dp"
+        android:paddingBottom="2dp"
+        android:layout_marginLeft="8dp"
+        android:background="@drawable/button_full_normal_gray"
+        app:layout_constraintLeft_toRightOf="@+id/article_comment_time_tv"
+        app:layout_constraintBottom_toBottomOf="@id/article_comment_num1"
+        app:layout_constraintTop_toTopOf="@id/article_comment_num1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content" />
+
+    <LinearLayout
+        android:id="@+id/article_comment_reply"
+        app:layout_constraintTop_toBottomOf="@+id/article_comment_num1"
+        app:layout_constraintLeft_toRightOf="@+id/article_comment_user_avatar"
+        app:layout_constraintRight_toRightOf="parent"
+        android:orientation="vertical"
+        android:background="#f0f0f0"
+        android:layout_width="0dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginBottom="16dp"
+        android:layout_marginLeft="8dp"
+        android:layout_marginRight="16dp"
+        android:padding="6dp"
+        android:layout_height="wrap_content">
+        <TextView
+            android:id="@+id/article_comment_last_reply"
+            android:text="haha:继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效"
+            android:textSize="12sp"
+            android:textColor="#333333"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+
+        <TextView
+            android:id="@+id/article_comment_reply_count"
+            android:text="查看3条回复>"
+            android:layout_marginTop="8dp"
+            android:textColor="#2ebef2"
+            android:textSize="12sp"
+            android:gravity="right"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+    </LinearLayout>
 </android.support.constraint.ConstraintLayout>

+ 111 - 45
app/src/main/res/layout/item_gc_game_app_comment.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:paddingBottom="8dp"
     android:layout_width="match_parent"
     android:layout_height="wrap_content">
 
@@ -32,10 +33,24 @@
         android:text="栗子的菜"
         android:textColor="#ff333333"
         android:textSize="13sp"
-        app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toEndOf="@id/game_app_comment_user_avatar"
         app:layout_constraintTop_toTopOf="@id/game_app_comment_user_avatar" />
 
+    <TextView
+        android:id="@+id/game_app_comment_user_flag"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:padding="2dp"
+        android:text="官方"
+        android:textColor="@color/blue_end"
+        android:textSize="10sp"
+        android:background="@drawable/shape_blue_stroke_rectangle_3_radius"
+        app:layout_constraintStart_toEndOf="@id/game_app_comment_user_name"
+        app:layout_constraintBottom_toBottomOf="@id/game_app_comment_user_name"
+        app:layout_constraintTop_toTopOf="@id/game_app_comment_user_name" />
+
     <android.support.v7.widget.AppCompatRatingBar
         android:id="@+id/game_app_comment_score"
         style="@style/style_rating_bar"
@@ -49,18 +64,19 @@
 
     <TextView
         android:id="@+id/intro_content"
-        android:layout_width="match_parent"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:ellipsize="end"
         android:lineSpacingMultiplier="1.3"
         android:maxLines="3"
-        android:paddingStart="16dp"
         android:paddingTop="13dp"
-        android:paddingEnd="16dp"
+        android:layout_marginRight="16dp"
         android:paddingBottom="10dp"
         android:text="《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。"
         android:textColor="#ff666666"
         android:textSize="12sp"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintLeft_toLeftOf="@id/game_app_comment_user_name"
         app:layout_constraintTop_toBottomOf="@id/game_app_comment_user_avatar" />
 
     <TextView
@@ -76,24 +92,24 @@
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toBottomOf="@id/intro_content" />
 
-    <TextView
-        android:id="@+id/game_app_comment_num1"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:paddingTop="14dp"
-        android:paddingBottom="14dp"
-        android:paddingStart="8dp"
-        android:paddingEnd="8dp"
-        android:layout_marginEnd="10dp"
-        android:layout_marginBottom="6dp"
-        android:drawableStart="@drawable/ic_but_speak"
-        android:drawablePadding="6dp"
-        android:text="54"
-        android:textColor="#ff666666"
-        android:textSize="11sp"
-        app:layout_constraintBottom_toBottomOf="parent"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/intro_show_all" />
+    <!--<TextView-->
+        <!--android:id="@+id/game_app_comment_num1"-->
+        <!--android:layout_width="wrap_content"-->
+        <!--android:layout_height="wrap_content"-->
+        <!--android:paddingTop="14dp"-->
+        <!--android:paddingBottom="14dp"-->
+        <!--android:paddingStart="8dp"-->
+        <!--android:paddingEnd="8dp"-->
+        <!--android:layout_marginEnd="10dp"-->
+        <!--android:layout_marginBottom="6dp"-->
+        <!--android:drawableStart="@drawable/ic_but_speak"-->
+        <!--android:drawablePadding="6dp"-->
+        <!--android:text="54"-->
+        <!--android:textColor="#ff666666"-->
+        <!--android:textSize="11sp"-->
+        <!--app:layout_constraintBottom_toBottomOf="parent"-->
+        <!--app:layout_constraintEnd_toEndOf="parent"-->
+        <!--app:layout_constraintTop_toBottomOf="@id/intro_show_all" />-->
 
     <TextView
         android:id="@+id/game_app_comment_num2"
@@ -103,40 +119,90 @@
         android:paddingBottom="14dp"
         android:paddingStart="8dp"
         android:paddingEnd="8dp"
+        android:layout_marginEnd="10dp"
         android:drawableStart="@drawable/ic_but_up"
         android:drawablePadding="6dp"
         android:text="54"
         android:textColor="#ff666666"
         android:textSize="11sp"
-        app:layout_constraintEnd_toStartOf="@id/game_app_comment_num1"
-        app:layout_constraintTop_toTopOf="@id/game_app_comment_num1" />
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/intro_content" />
 
-    <TextView
-        android:id="@+id/game_app_comment_num3"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:paddingTop="14dp"
-        android:paddingBottom="14dp"
-        android:paddingStart="8dp"
-        android:paddingEnd="8dp"
-        android:drawableStart="@drawable/ic_image_xiao"
-        android:drawablePadding="6dp"
-        android:text="54"
-        android:textColor="#ff666666"
-        android:textSize="11sp"
-        app:layout_constraintEnd_toStartOf="@id/game_app_comment_num2"
-        app:layout_constraintTop_toTopOf="@id/game_app_comment_num1" />
+    <!--<TextView-->
+        <!--android:id="@+id/game_app_comment_num3"-->
+        <!--android:layout_width="wrap_content"-->
+        <!--android:layout_height="wrap_content"-->
+        <!--android:paddingTop="14dp"-->
+        <!--android:paddingBottom="14dp"-->
+        <!--android:paddingStart="8dp"-->
+        <!--android:paddingEnd="8dp"-->
+        <!--android:drawableStart="@drawable/ic_image_xiao"-->
+        <!--android:drawablePadding="6dp"-->
+        <!--android:text="54"-->
+        <!--android:textColor="#ff666666"-->
+        <!--android:textSize="11sp"-->
+        <!--app:layout_constraintEnd_toStartOf="@id/game_app_comment_num2"-->
+        <!--app:layout_constraintTop_toTopOf="@id/game_app_comment_num2" />-->
 
     <TextView
         android:id="@+id/game_app_comment_time_tv"
         android:layout_width="wrap_content"
         android:layout_height="0dp"
-        android:paddingStart="16dp"
-        android:paddingEnd="16dp"
-        android:textSize="7sp"
+        android:textSize="11sp"
         android:textColor="#ff666666"
         android:gravity="center_vertical"
-        android:text="@string/app_name"
-        app:layout_constraintBottom_toBottomOf="@id/game_app_comment_num1"
-        app:layout_constraintTop_toTopOf="@id/game_app_comment_num1"/>
+        android:text="2020-02-02 16:31"
+        app:layout_constraintLeft_toLeftOf="@id/game_app_comment_user_name"
+        app:layout_constraintBottom_toBottomOf="@id/game_app_comment_num2"
+        app:layout_constraintTop_toTopOf="@id/game_app_comment_num2"/>
+
+    <TextView
+        android:id="@+id/game_app_comment_reply_btn"
+        android:text="回复"
+        android:textColor="#666666"
+        android:textSize="10sp"
+        android:paddingLeft="8dp"
+        android:paddingRight="8dp"
+        android:paddingTop="2dp"
+        android:paddingBottom="2dp"
+        android:layout_marginLeft="8dp"
+        android:background="@drawable/button_full_normal_gray"
+        app:layout_constraintLeft_toRightOf="@+id/game_app_comment_time_tv"
+        app:layout_constraintBottom_toBottomOf="@id/game_app_comment_num2"
+        app:layout_constraintTop_toTopOf="@id/game_app_comment_num2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content" />
+
+    <LinearLayout
+        android:id="@+id/game_app_comment_reply"
+        app:layout_constraintTop_toBottomOf="@+id/game_app_comment_reply_btn"
+        app:layout_constraintLeft_toRightOf="@+id/game_app_comment_user_avatar"
+        app:layout_constraintRight_toRightOf="parent"
+        android:orientation="vertical"
+        android:background="#f0f0f0"
+        android:layout_width="0dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginBottom="16dp"
+        android:layout_marginLeft="8dp"
+        android:layout_marginRight="16dp"
+        android:padding="6dp"
+        android:layout_height="wrap_content">
+        <TextView
+            android:id="@+id/game_app_comment_last_reply"
+            android:text="haha:继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效"
+            android:textSize="12sp"
+            android:textColor="#333333"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+
+        <TextView
+            android:id="@+id/game_app_comment_reply_count"
+            android:text="查看3条回复>"
+            android:layout_marginTop="8dp"
+            android:textColor="#2ebef2"
+            android:textSize="12sp"
+            android:gravity="right"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content" />
+    </LinearLayout>
 </android.support.constraint.ConstraintLayout>

+ 37 - 11
app/src/main/res/layout/item_user_comment_reply.xml

@@ -32,26 +32,40 @@
         android:text="栗子的菜"
         android:textColor="#ff333333"
         android:textSize="13sp"
-        app:layout_constraintBottom_toBottomOf="@id/game_app_comment_user_avatar"
-        app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toTopOf="@id/game_app_comment_user_avatar" />
 
     <TextView
+        android:id="@+id/game_app_comment_user_flag"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:padding="2dp"
+        android:text="官方"
+        android:textColor="@color/blue_end"
+        android:textSize="10sp"
+        android:background="@drawable/shape_blue_stroke_rectangle_3_radius"
+        app:layout_constraintStart_toEndOf="@id/game_app_comment_user_name"
+        app:layout_constraintBottom_toBottomOf="@id/game_app_comment_user_name"
+        app:layout_constraintTop_toTopOf="@id/game_app_comment_user_name" />
+
+    <TextView
         android:id="@+id/intro_content"
-        android:layout_width="match_parent"
+        android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:ellipsize="end"
         android:lineSpacingMultiplier="1.3"
         android:maxLines="3"
-        android:paddingStart="50dp"
-        android:paddingTop="13dp"
-        android:paddingEnd="36dp"
-        android:paddingBottom="10dp"
+        android:paddingTop="8dp"
+        android:paddingBottom="8dp"
         android:text="《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。"
         android:textColor="#ff666666"
         android:textSize="12sp"
-        app:layout_constraintTop_toBottomOf="@id/game_app_comment_user_avatar" />
+        android:layout_marginRight="24dp"
+        app:layout_constraintLeft_toLeftOf="@id/game_app_comment_user_name"
+        app:layout_constraintRight_toRightOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/game_app_comment_user_name" />
 
     <TextView
         android:id="@+id/intro_show_all"
@@ -87,20 +101,32 @@
         android:id="@+id/game_app_comment_num2"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_marginEnd="10dp"
+        android:layout_marginEnd="20dp"
         android:layout_marginBottom="6dp"
         android:drawableStart="@drawable/ic_but_up"
         android:drawablePadding="6dp"
         android:paddingStart="8dp"
-        android:paddingTop="14dp"
+        android:paddingTop="8dp"
         android:paddingEnd="8dp"
-        android:paddingBottom="14dp"
+        android:paddingBottom="8dp"
         android:text="54"
         android:textColor="#ff666666"
         android:textSize="11sp"
         app:layout_constraintEnd_toStartOf="@id/game_app_comment_num1"
         app:layout_constraintTop_toBottomOf="@id/intro_show_all" />
 
+    <TextView
+        android:id="@+id/game_app_comment_publish_time"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/user_comment_detail_user_name"
+        android:text="昨天"
+        android:textColor="#ffcccccc"
+        android:textSize="11sp"
+        app:layout_constraintLeft_toLeftOf="@+id/game_app_comment_user_name"
+        app:layout_constraintBottom_toBottomOf="@+id/game_app_comment_num2"
+        app:layout_constraintTop_toTopOf="@+id/game_app_comment_num2"/>
+
     <View
         android:id="@+id/game_app_comment_line_bottom"
         android:layout_width="match_parent"

+ 2 - 2
app/src/main/res/values/dd_styles.xml

@@ -211,9 +211,9 @@
         <item name="android:layout_height">10dip</item>
     </style>
 
-    <style name="style_rating_bar" parent="@android:style/Widget.RatingBar">
+    <style name="style_rating_bar" parent="@android:style/Widget.Holo.RatingBar.Small">
         <item name="android:progressDrawable">@drawable/lay_list_ratingbar</item>
-        <item name="android:layout_height">18dip</item>
+        <item name="android:layout_height">16dip</item>
     </style>
 
     <style name="style_ash_tv">