Pārlūkot izejas kodu

用户游戏主页详情界面基本完成

zengjiebin 7 gadi atpakaļ
vecāks
revīzija
56a88d0b8a
37 mainītis faili ar 1822 papildinājumiem un 220 dzēšanām
  1. 3 0
      app/src/main/AndroidManifest.xml
  2. 0 11
      app/src/main/java/com/sheep/gamegroup/absBase/ICanShowAll.java
  3. 28 2
      app/src/main/java/com/sheep/gamegroup/model/entity/GameInfoList.java
  4. 28 0
      app/src/main/java/com/sheep/gamegroup/model/entity/LatelyGame.java
  5. 64 0
      app/src/main/java/com/sheep/gamegroup/model/entity/ShowAll.java
  6. 71 41
      app/src/main/java/com/sheep/gamegroup/model/entity/UserComment.java
  7. 1 3
      app/src/main/java/com/sheep/gamegroup/model/entity/UserCommentReply.java
  8. 124 0
      app/src/main/java/com/sheep/gamegroup/model/entity/UserCommentWithReply.java
  9. 114 0
      app/src/main/java/com/sheep/gamegroup/model/entity/UserFocus.java
  10. 24 0
      app/src/main/java/com/sheep/gamegroup/util/ApiUtil.java
  11. 46 0
      app/src/main/java/com/sheep/gamegroup/util/IDConstant.java
  12. 9 0
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  13. 9 15
      app/src/main/java/com/sheep/gamegroup/util/TextViewUtil.java
  14. 2 1
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  15. 74 0
      app/src/main/java/com/sheep/gamegroup/util/viewHelper/UserCommentHelper.java
  16. 1 2
      app/src/main/java/com/sheep/gamegroup/view/activity/ActGcGameAppDetail.java
  17. 302 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActUserAppHome.java
  18. 7 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppComment.java
  19. 6 3
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppInfoList.java
  20. 38 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppList.java
  21. 37 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpUserAppHomeComment.java
  22. 60 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpUserAppHomeReply.java
  23. 3 15
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppDetail.java
  24. 1 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppWelfare.java
  25. 71 0
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtUserAppHomeCommentList.java
  26. 72 0
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtUserAppHomeReplyList.java
  27. 46 80
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtUserCommentDetail.java
  28. 56 36
      app/src/main/java/org/afinal/simplecache/ApiKey.java
  29. 218 0
      app/src/main/res/layout/act_user_app_home.xml
  30. 1 9
      app/src/main/res/layout/header_user_comment_detail.xml
  31. 36 0
      app/src/main/res/layout/include_intro.xml
  32. 11 0
      app/src/main/res/layout/include_total_count_tv.xml
  33. 6 0
      app/src/main/res/layout/item_gc_game_app_detail_list.xml
  34. 181 0
      app/src/main/res/layout/item_user_app_home_comment.xml
  35. 63 0
      app/src/main/res/layout/item_user_app_home_reply.xml
  36. 7 0
      app/src/main/res/values/strings.xml
  37. 2 1
      view/src/main/java/com/kfzs/android/view/widget/WrapContentHeightViewPager.java

+ 3 - 0
app/src/main/AndroidManifest.xml

@@ -682,6 +682,9 @@
             android:name="com.sheep.gamegroup.view.activity.ActUserCommentDetail"
             android:screenOrientation="portrait" />
         <activity
+            android:name="com.sheep.gamegroup.view.activity.ActUserAppHome"
+            android:screenOrientation="portrait" />
+        <activity
             android:name="com.sheep.gamegroup.view.activity.ActPlayGameDetail"
             android:screenOrientation="portrait" />
         <activity

+ 0 - 11
app/src/main/java/com/sheep/gamegroup/absBase/ICanShowAll.java

@@ -1,11 +0,0 @@
-package com.sheep.gamegroup.absBase;
-
-import com.sheep.gamegroup.model.entity.ShowAll;
-
-/**
- * Created by realicing on 2018/11/2.
- * realicing@sina.com
- */
-public interface ICanShowAll {
-    ShowAll getShowAll();
-}

+ 28 - 2
app/src/main/java/com/sheep/gamegroup/model/entity/GameInfoList.java

@@ -56,8 +56,13 @@ public class GameInfoList implements Comparable<GameInfoList> {
     }
 
     public void setMoreViewOnClickListener(TextView textView) {
-        if (textView != null && onClickListener != null) {
-            textView.setOnClickListener(onClickListener);
+        if (textView != null) {
+            if(onClickListener == null){
+                textView.setVisibility(View.INVISIBLE);
+            } else {
+                textView.setVisibility(View.VISIBLE);
+                textView.setOnClickListener(onClickListener);
+            }
         }
     }
 
@@ -86,6 +91,27 @@ public class GameInfoList implements Comparable<GameInfoList> {
             layoutManager = new LinearLayoutManager(SheepApp.getInstance());
         return layoutManager;
     }
+    private boolean showTopLine = true;//默认显示上面的线
+
+    public boolean isShowTopLine() {
+        return showTopLine;
+    }
+
+    public GameInfoList setShowTopLine(boolean showTopLine) {
+        this.showTopLine = showTopLine;
+        return this;
+    }
+
+    private boolean showBottomLine;
+
+    public boolean isShowBottomLine() {
+        return showBottomLine;
+    }
+
+    public GameInfoList setShowBottomLine(boolean showBottomLine) {
+        this.showBottomLine = showBottomLine;
+        return this;
+    }
 
     @Override
     public int compareTo(@NonNull GameInfoList gameInfoList) {

+ 28 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/LatelyGame.java

@@ -0,0 +1,28 @@
+package com.sheep.gamegroup.model.entity;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/11/5.
+ * realicing@sina.com
+ */
+public class LatelyGame {
+    private List<GameApp> lately;
+    private List<GameApp> same;
+
+    public List<GameApp> getLately() {
+        return lately;
+    }
+
+    public void setLately(List<GameApp> lately) {
+        this.lately = lately;
+    }
+
+    public List<GameApp> getSame() {
+        return same;
+    }
+
+    public void setSame(List<GameApp> same) {
+        this.same = same;
+    }
+}

+ 64 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/ShowAll.java

@@ -1,5 +1,7 @@
 package com.sheep.gamegroup.model.entity;
 
+import com.sheep.jiuyan.samllsheep.R;
+
 /**
  * Created by realicing on 2018/11/2.
  * realicing@sina.com
@@ -13,6 +15,7 @@ public class ShowAll {
     private boolean yes;
     private int canShowAllState;//0 初始状态, 1, false, 2 true
     private String content;
+    private String showAllText = "显示全部";
 
     public boolean isYes() {
         return yes;
@@ -40,4 +43,65 @@ public class ShowAll {
     public void setContent(String content) {
         this.content = content;
     }
+
+    public String getShowAllText() {
+        return showAllText;
+    }
+
+    public ShowAll setShowAllText(String showAllText) {
+        this.showAllText = showAllText;
+        return this;
+    }
+
+
+
+
+
+
+
+
+
+    //文本内容的id
+    private int introContentId = R.id.intro_content;
+    //显示全部按钮的id
+    private int introShowAllId = R.id.intro_show_all;
+    //替换显示全部按钮位置的控件的id
+    private int introShowAllNoId = R.id.intro_show_all_no;
+
+    public int getIntroShowAllId() {
+        return introShowAllId;
+    }
+
+    public ShowAll setIntroShowAllId(int introShowAllId) {
+        this.introShowAllId = introShowAllId;
+        return this;
+    }
+
+    public int getIntroShowAllNoId() {
+        return introShowAllNoId;
+    }
+
+    public ShowAll setIntroShowAllNoId(int introShowAllNoId) {
+        this.introShowAllNoId = introShowAllNoId;
+        return this;
+    }
+
+    public int getIntroContentId() {
+        return introContentId;
+    }
+
+    public ShowAll setIntroContentId(int introContentId) {
+        this.introContentId = introContentId;
+        return this;
+    }
+
+    private int maxLine = 3;//默认最多3行
+    public int getMaxLine() {
+        return maxLine;
+    }
+    public ShowAll setMaxLine(int maxLine) {
+        this.maxLine = maxLine;
+        return this;
+    }
+
 }

+ 71 - 41
app/src/main/java/com/sheep/gamegroup/model/entity/UserComment.java

@@ -1,8 +1,6 @@
 package com.sheep.gamegroup.model.entity;
 
 
-import com.sheep.gamegroup.absBase.ICanShowAll;
-
 /**
  * Created by realicing on 2018/11/1.
  * realicing@sina.com
@@ -37,10 +35,10 @@ import com.sheep.gamegroup.absBase.ICanShowAll;
  * id:	integer ($int64)
  * comment:	integer ($int64)
  * 评论数
- *
+ * <p>
  * 用户评论
  */
-public class UserComment implements ICanShowAll {
+public class UserComment {
 
     private int id;
 
@@ -76,115 +74,147 @@ public class UserComment implements ICanShowAll {
 
     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_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 setApp_id(int app_id){
+
+    public void setApp_id(int app_id) {
         this.app_id = app_id;
     }
-    public int getApp_id(){
+
+    public int getApp_id() {
         return this.app_id;
     }
-    public void setApp_name(String app_name){
+
+    public void setApp_name(String app_name) {
         this.app_name = app_name;
     }
-    public String getApp_name(){
+
+    public String getApp_name() {
         return this.app_name;
     }
-    public void setApp_icon(String app_icon){
+
+    public void setApp_icon(String app_icon) {
         this.app_icon = app_icon;
     }
-    public String getApp_icon(){
+
+    public String getApp_icon() {
         return this.app_icon;
     }
-    public void setApp_type(int app_type){
+
+    public void setApp_type(int app_type) {
         this.app_type = app_type;
     }
-    public int getApp_type(){
+
+    public int getApp_type() {
         return this.app_type;
     }
-    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 setExpression(int expression){
+
+    public void setExpression(int expression) {
         this.expression = expression;
     }
-    public int getExpression(){
+
+    public int getExpression() {
         return this.expression;
     }
-    public void setComment(int comment){
+
+    public void setComment(int comment) {
         this.comment = comment;
     }
-    public int getComment(){
+
+    public int getComment() {
         return this.comment;
     }
-    public void setScore(int score){
+
+    public void setScore(int score) {
         this.score = score;
     }
-    public int getScore(){
+
+    public int getScore() {
         return this.score;
     }
-    public void setLevel(int level){
+
+    public void setLevel(int level) {
         this.level = level;
     }
-    public int getLevel(){
+
+    public int getLevel() {
         return this.level;
     }
-    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 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;
     }
 
 
-
     private ShowAll showAll;
-    @Override
+
     public ShowAll getShowAll() {
-        if(showAll == null)
+        if (showAll == null)
             showAll = new ShowAll(content);
         return showAll;
     }

+ 1 - 3
app/src/main/java/com/sheep/gamegroup/model/entity/UserCommentReply.java

@@ -1,6 +1,5 @@
 package com.sheep.gamegroup.model.entity;
 
-import com.sheep.gamegroup.absBase.ICanShowAll;
 
 /**
  * Created by realicing on 2018/11/2.
@@ -27,7 +26,7 @@ import com.sheep.gamegroup.absBase.ICanShowAll;
  * <p>
  * description:用户评论信息
  */
-public class UserCommentReply implements ICanShowAll {
+public class UserCommentReply {
     private int id;
 
     private int user_comment_id;
@@ -123,7 +122,6 @@ public class UserCommentReply implements ICanShowAll {
 
 
     private ShowAll showAll;
-    @Override
     public ShowAll getShowAll() {
         if(showAll == null)
             showAll = new ShowAll(content);

+ 124 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/UserCommentWithReply.java

@@ -0,0 +1,124 @@
+package com.sheep.gamegroup.model.entity;
+
+
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2018/11/2.
+ * realicing@sina.com
+ * app_id:	integer ($int64)
+ * 评论应用id
+ * app_name:	string
+ * 应用名称
+ * content:	string
+ * 评论内容
+ * like:	integer ($int64)
+ * 点赞数
+ * nickname:	string
+ * 昵称
+ * reply_content:	string
+ * 回复内容
+ * user_comment_id:	integer ($int64)
+ * 评论id
+ * user_id:	integer ($int64)
+ * 用户id
+ * <p>
+ * description:用户评论信息
+ */
+public class UserCommentWithReply {
+    private int app_id;
+
+    private int user_comment_id;
+
+    private int user_id;
+
+    private String nickname;
+
+    private String app_name;
+
+    private int like;
+
+
+    private String content;
+
+    private String reply_content;
+
+    public int getApp_id() {
+        return app_id;
+    }
+
+    public void setApp_id(int app_id) {
+        this.app_id = app_id;
+    }
+
+    public int getUser_comment_id() {
+        return user_comment_id;
+    }
+
+    public void setUser_comment_id(int user_comment_id) {
+        this.user_comment_id = user_comment_id;
+    }
+
+    public int getUser_id() {
+        return user_id;
+    }
+
+    public void setUser_id(int user_id) {
+        this.user_id = user_id;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    public String getApp_name() {
+        return app_name;
+    }
+
+    public void setApp_name(String app_name) {
+        this.app_name = app_name;
+    }
+
+    public int getLike() {
+        return like;
+    }
+
+    public void setLike(int like) {
+        this.like = like;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getReply_content() {
+        return reply_content;
+    }
+
+    public void setReply_content(String reply_content) {
+        this.reply_content = reply_content;
+    }
+
+
+
+    private ShowAll showAll;
+    public ShowAll getContentShowAll() {
+        if(showAll == null)
+            showAll = new ShowAll(String.format(Locale.CHINA, "%s 评论: %s", nickname, content));
+        return showAll;
+    }
+    private ShowAll replyShowAll;
+    public ShowAll getReplyShowAll() {
+        if(replyShowAll == null)
+            replyShowAll = new ShowAll(String.format(Locale.CHINA, "我在 %s 评论 %s\n%s", app_name, nickname, reply_content));
+        return replyShowAll;
+    }
+}

+ 114 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/UserFocus.java

@@ -0,0 +1,114 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/11/5.
+ * realicing@sina.com
+ * 用户主页详情
+ * update_time:	integer ($int64)
+ * user_id:	integer ($int64)
+ * 用户id
+ * create_time:	integer ($int64)
+ * focus_user:	integer ($int64)
+ * 关注人数
+ * fan:	integer ($int64)
+ * 粉丝人数
+ * like:	integer ($int64)
+ * 点赞数
+ * avatar:	string
+ * 头像
+ * focus_game:	integer ($int64)
+ * 关注游戏
+ * id:	integer ($int64)
+ */
+public class UserFocus {
+    private int id;
+    private int focus_game;
+    private int like;
+    private int fan;
+    private int focus_user;
+    private int create_time;
+    private int user_id;
+    private int update_time;
+    private String avatar;
+    private String nick_name;
+
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+    public int getFocus_game() {
+        return focus_game;
+    }
+
+    public void setFocus_game(int focus_game) {
+        this.focus_game = focus_game;
+    }
+
+    public int getLike() {
+        return like;
+    }
+
+    public void setLike(int like) {
+        this.like = like;
+    }
+
+    public int getFan() {
+        return fan;
+    }
+
+    public void setFan(int fan) {
+        this.fan = fan;
+    }
+
+    public int getFocus_user() {
+        return focus_user;
+    }
+
+    public void setFocus_user(int focus_user) {
+        this.focus_user = focus_user;
+    }
+
+    public int getCreate_time() {
+        return create_time;
+    }
+
+    public void setCreate_time(int create_time) {
+        this.create_time = create_time;
+    }
+
+    public int getUser_id() {
+        return user_id;
+    }
+
+    public void setUser_id(int user_id) {
+        this.user_id = user_id;
+    }
+
+    public int getUpdate_time() {
+        return update_time;
+    }
+
+    public void setUpdate_time(int update_time) {
+        this.update_time = update_time;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public String getNick_name() {
+        return nick_name;
+    }
+
+    public void setNick_name(String nick_name) {
+        this.nick_name = nick_name;
+    }
+}

+ 24 - 0
app/src/main/java/com/sheep/gamegroup/util/ApiUtil.java

@@ -0,0 +1,24 @@
+package com.sheep.gamegroup.util;
+
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/11/6.
+ * realicing@sina.com
+ * 共用接口调用
+ */
+public class ApiUtil {
+
+    //用户游戏评论点赞
+    public static void postGameUserUserGameCommentLike(int user_comment_id, SheepSubscriber<BaseMessage> sheepSubscriber) {
+        SheepApp.getInstance().getNetComponent().getApiService().postGameUserUserGameCommentLike(user_comment_id)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(sheepSubscriber);
+    }
+}

+ 46 - 0
app/src/main/java/com/sheep/gamegroup/util/IDConstant.java

@@ -0,0 +1,46 @@
+package com.sheep.gamegroup.util;
+
+/**
+ * Created by realicing on 2018/11/6.
+ * realicing@sina.com
+ */
+public class IDConstant {
+
+
+    public static final int JUMP_NEW_USER_TASK = -1;//新手任务
+    public static final int JUMP_TRY_PLAY = 1;//试玩赚钱
+    public static final int JUMP_ASK_FRIEND = 2;//邀请赚钱
+    public static final int JUMP_LIE_MAKE = 3;//躺着赚钱
+    public static final int JUMP_CREDIT_CARD = 4;//办卡赚钱
+    public static final int JUMP_GAME_CENTER = 5;//游戏中心
+    public static final int JUMP_RECHARGE_Q = 6;//充值q币
+    public static final int JUMP_WX_ASSIST = 7;//微信辅助
+    public static final int JUMP_SUCCESSION_TASK = 8;//连续任务
+    public static final int JUMP_SIGN_CARD = 9;//打卡赚钱
+    public static final int JUMP_GAME_TASK = 11;//游戏任务
+    public static final int JUMP_XIAN_WAN = 12;//闲玩任务
+    public static final int JUMP_GAME_RECHARGE = 13;//游戏代充(游戏充值)
+    public static final int JUMP_MI_DONG = 14;//幂动科技(简单任务)
+    public static final int JUMP_XIAO_MI = 15;//小米游戏列表
+    public static final int JUMP_GMAE = 16;//游戏
+    public static final int JUMP_FIND_RECOMMEND = 17;//推荐
+    public static final int JUMP_WATCH_FOCUS = 18;//看点
+    public static final int JUMP_FIND_ACT = 19;//活动
+    public static final int JUMP_FIND_INFORMATION = 20;//资讯
+    public static final int JUMP_FIND_GMAE = 21;//发现中的游戏
+    public static final int GO_FIND_CENTER = 22;//跳转发现中心
+    public static final int JUMP_H5_INNER = 98;//内部WebView加载H5
+    public static final int JUMP_H5_OUTER = 99;//外部浏览器加载H5
+    public static final int JUMP_HOME = 101;//跳转到首页: id 0,小绵羊 1,游戏
+    public static final int JUMP_NOTICE = 102;//公告: title 标题   msg 内容
+    public static final int JUMP_DOWNLOAD = 103;//下载: url 下载链接
+    public static final int JUMP_MY_MONEY = 165;//我的资产
+    public static final int JUMP_RECHARGE = 164;//充值绵羊币
+    public static final int JUMP_CREDIT_CARD_DETAIL = 132;//跳转到信用卡详情界面: id 信用卡任务的id
+    public static final int JUMP_CREDIT_CARD_WEB = 133;//跳转到信用卡web申请界面; id 信用卡信息的id
+    public static final int JUMP_AUDIT_TASK_LIST = 113;//任务记录
+    public static final int JUMP_TASK_DETAIL = 112;//任务详情: 任务的id
+    //TODO 这里移动积分兑换的id需要替换
+    public static final int JUMP_EXCHANGE_CMCC = 1000025;//移动积分兑换
+    public static final int JUMP_YM = 1000026;//有米积分
+}

+ 9 - 0
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -79,6 +79,7 @@ import com.sheep.gamegroup.view.activity.ActSignCard;
 import com.sheep.gamegroup.view.activity.ActSignCardRecord;
 import com.sheep.gamegroup.view.activity.ActSysNfDetail;
 import com.sheep.gamegroup.view.activity.ActUnderstandSheep;
+import com.sheep.gamegroup.view.activity.ActUserAppHome;
 import com.sheep.gamegroup.view.activity.ActUserCommentDetail;
 import com.sheep.gamegroup.view.activity.ActUserLabelList;
 import com.sheep.gamegroup.view.activity.ActWeb;
@@ -2107,4 +2108,12 @@ public class Jump2View {
     public void goActAppCommentDetail(Activity activity, int user_comment_id ) {
         activity.startActivity(DataUtil.putObject(new Intent(activity, ActUserCommentDetail.class), user_comment_id));
     }
+    /**
+     * 跳转个人游戏主页界面
+     * @param activity
+     * @param user_id
+     */
+    public void goActUserAppHome(Activity activity, int user_id ) {
+        activity.startActivity(DataUtil.putObject(new Intent(activity, ActUserAppHome.class), user_id));
+    }
 }

+ 9 - 15
app/src/main/java/com/sheep/gamegroup/util/TextViewUtil.java

@@ -3,12 +3,9 @@ package com.sheep.gamegroup.util;
 import android.text.Layout;
 import android.text.TextUtils;
 import android.view.View;
-import android.view.ViewTreeObserver;
 import android.widget.TextView;
 
-import com.sheep.gamegroup.absBase.ICanShowAll;
 import com.sheep.gamegroup.model.entity.ShowAll;
-import com.sheep.jiuyan.samllsheep.R;
 
 import rx.functions.Action1;
 
@@ -46,25 +43,22 @@ public class TextViewUtil {
     }
     //初始化文本介绍,必须有 intro_content 和 intro_show_all
     public static void initIntroView(View itemView, final ShowAll showAll) {
-        initIntroView(itemView, showAll, "显示全部");
-    }
-    //初始化文本介绍,必须有 intro_content 和 intro_show_all
-    public static void initIntroView(View itemView, final ShowAll showAll, final String showAllText) {
         String text = showAll.getContent();
-        final TextView intro_content = itemView.findViewById(R.id.intro_content);
-        final TextView intro_show_all = itemView.findViewById(R.id.intro_show_all);
-        final View intro_show_all_no = itemView.findViewById(R.id.intro_show_all_no);
+        final TextView intro_content = itemView.findViewById(showAll.getIntroContentId());
+        final TextView intro_show_all = itemView.findViewById(showAll.getIntroShowAllId());
+        final View intro_show_all_no = itemView.findViewById(showAll.getIntroShowAllNoId());
         boolean isFirst = showAll.isFirst();
 
         ViewUtil.setText(intro_content, text);
         if(isFirst) {
+            intro_content.setMaxLines(showAll.getMaxLine());
             TextViewUtil.listenEllipsizeChange(intro_content, new Action1<Integer>() {
                 @Override
                 public void call(Integer integer) {
                     boolean canShowAll = integer > 0;
                     showAll.setYes(false);
                     showAll.setCanShowAll(canShowAll);
-                    intro_show_all.setText(showAllText);
+                    intro_show_all.setText(showAll.getShowAllText());
                     if (canShowAll) {
                         ViewUtil.setVisibility(intro_show_all, true);
                         ViewUtil.setVisibility(intro_show_all_no, false);
@@ -73,9 +67,9 @@ public class TextViewUtil {
             });
         } else {
             boolean hasShowAll = showAll.isYes();
-            intro_content.setMaxLines(hasShowAll ? Integer.MAX_VALUE : 3);
+            intro_content.setMaxLines(hasShowAll ? Integer.MAX_VALUE : showAll.getMaxLine());
             intro_content.setEllipsize(hasShowAll ? null : TextUtils.TruncateAt.END);
-            intro_show_all.setText(hasShowAll ? "收起" : showAllText);
+            intro_show_all.setText(hasShowAll ? "收起" : showAll.getShowAllText());
             ViewUtil.setVisibility(intro_show_all, showAll.isCanShowAll());
             ViewUtil.setVisibility(intro_show_all_no, !showAll.isCanShowAll());
         }
@@ -84,9 +78,9 @@ public class TextViewUtil {
             public void onClick(View view) {
                 showAll.setYes(!showAll.isYes());
                 boolean hasShowAll = showAll.isYes();
-                intro_content.setMaxLines(hasShowAll ? Integer.MAX_VALUE : 3);
+                intro_content.setMaxLines(hasShowAll ? Integer.MAX_VALUE : showAll.getMaxLine());
                 intro_content.setEllipsize(hasShowAll ? null : TextUtils.TruncateAt.END);
-                intro_show_all.setText(hasShowAll ? "收起" : showAllText);
+                intro_show_all.setText(hasShowAll ? "收起" : showAll.getShowAllText());
             }
         });
     }

+ 2 - 1
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -338,6 +338,7 @@ public class ViewUtil {
 
     }
 
+    public static final String BLOCK = "\u2588";//用特殊字符显示方块
     /**
      * 设置默认方块文本
      *
@@ -348,7 +349,7 @@ public class ViewUtil {
         int length = TextUtils.isEmpty(text) ? Math.abs(new Random().nextInt(7)) : text.length();
         StringBuilder stringBuilder = new StringBuilder();
         for (int i = 0; i < length; i++) {
-            stringBuilder.append("\u2588");
+            stringBuilder.append(BLOCK);
         }
         textView.setText(stringBuilder);
     }

+ 74 - 0
app/src/main/java/com/sheep/gamegroup/util/viewHelper/UserCommentHelper.java

@@ -0,0 +1,74 @@
+package com.sheep.gamegroup.util.viewHelper;
+
+import android.support.v7.widget.AppCompatRatingBar;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.dateview.DateUtil;
+import com.sheep.gamegroup.model.entity.UserComment;
+import com.sheep.gamegroup.util.TextViewUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+/**
+ * Created by realicing on 2018/11/6.
+ * realicing@sina.com
+ * 用户评论帮助类
+ */
+public class UserCommentHelper {
+    protected View rootView;
+
+    public UserCommentHelper(int rootViewId) {
+        this.rootView = LayoutInflater.from(SheepApp.getInstance()).inflate(rootViewId, null);
+        initView();
+    }
+
+    public UserCommentHelper(View rootView) {
+        this.rootView = rootView;
+        initView();
+    }
+
+    public View getRootView() {
+        return rootView;
+    }
+
+    protected TextView user_comment_detail_game_name;
+    protected ImageView user_comment_detail_game_icon;
+    protected ImageView user_comment_detail_user_avatar;
+    protected TextView user_comment_detail_user_name;
+    protected TextView user_comment_detail_user_publish_time;
+    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 void initView() {
+        user_comment_detail_game_name = rootView.findViewById(R.id.user_comment_detail_game_name);
+        user_comment_detail_game_icon = rootView.findViewById(R.id.user_comment_detail_game_icon);
+        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_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);
+    }
+
+    //加载数据
+    public void loadHeaderViewData(final UserComment user_comment) {
+        user_comment_detail_user_publish_score.setMax(10);
+        user_comment_detail_user_publish_score.setProgress(user_comment.getScore());
+        ViewUtil.setText(user_comment_detail_num1, user_comment.getComment());
+        ViewUtil.setText(user_comment_detail_num2, user_comment.getLike());
+        ViewUtil.setText(user_comment_detail_num3, user_comment.getExpression());
+        ViewUtil.setText(user_comment_detail_game_name, user_comment.getApp_name());
+        ViewUtil.setText(user_comment_detail_user_name, user_comment.getNickname());
+        user_comment_detail_user_publish_time.setText(DateUtil.getTimeText(user_comment.getCreate_time()));
+        ViewUtil.setGameImage(user_comment_detail_game_icon, user_comment.getApp_icon());
+        ViewUtil.setAvatar(user_comment_detail_user_avatar, user_comment.getAvatar());
+        TextViewUtil.initIntroView(rootView, user_comment.getShowAll().setShowAllText("全文"));
+    }
+}

+ 1 - 2
app/src/main/java/com/sheep/gamegroup/view/activity/ActGcGameAppDetail.java

@@ -131,7 +131,6 @@ public class ActGcGameAppDetail extends BaseActivity {
                 loadMoreData();
             }
         });
-        fgtGcGameAppComment.setSmartRefreshLayout(refresh);
         RefreshUtil.newInstance().publicParameterLoadMore(refresh, this);
     }
 
@@ -206,7 +205,6 @@ public class ActGcGameAppDetail extends BaseActivity {
                 });
     }
 
-    private int refreshDataCount = 0;
     @Override
     public void initData() {
         GameEntity gameEntity = DataUtil.getInstance().getCacheResult(ApiKey.playGameDetail(id), GameEntity.class);
@@ -215,6 +213,7 @@ public class ActGcGameAppDetail extends BaseActivity {
             refresh.autoRefresh();
         }
     }
+    private int refreshDataCount = 0;
     //刷新数据
     public void refreshData(){
         initDetailFromNet();

+ 302 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActUserAppHome.java

@@ -0,0 +1,302 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.design.widget.TabLayout;
+import android.support.v4.app.Fragment;
+import android.support.v4.view.ViewPager;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.kfzs.duanduan.utils.StatusBarUtils;
+import com.scwang.smartrefresh.layout.SmartRefreshLayout;
+import com.scwang.smartrefresh.layout.api.RefreshLayout;
+import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.absBase.ILoadMore;
+import com.sheep.gamegroup.absBase.IRefresh;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.GameApp;
+import com.sheep.gamegroup.model.entity.GameInfoList;
+import com.sheep.gamegroup.model.entity.LatelyGame;
+import com.sheep.gamegroup.model.entity.UserFocus;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.RefreshUtil;
+import com.sheep.gamegroup.util.TestUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoList;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppList;
+import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
+import com.sheep.gamegroup.view.fragment.FgtUserAppHomeCommentList;
+import com.sheep.gamegroup.view.fragment.FgtUserAppHomeReplyList;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import org.afinal.simplecache.ApiKey;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by realicing on 2018/11/5.
+ * realicing@sina.com
+ */
+public class ActUserAppHome extends BaseActivity {
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        StatusBarUtils.setTranslucent(this);
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.act_user_app_home;
+    }
+
+    @BindView(R.id.refresh)
+    SmartRefreshLayout refresh;
+    @BindView(R.id.tabLayout)
+    TabLayout tabLayout;
+    @BindView(R.id.viewPager)
+    ViewPager viewPager;
+    @BindView(R.id.user_app_home_bg)
+    ImageView user_app_home_bg;
+    @BindView(R.id.user_app_home_avatar)
+    ImageView user_app_home_avatar;
+    @BindView(R.id.user_app_home_num_fans)
+    TextView user_app_home_num_fans;
+    @BindView(R.id.user_app_home_num_focus_users)
+    TextView user_app_home_num_focus_users;
+    @BindView(R.id.user_app_home_num_focus_games)
+    TextView user_app_home_num_focus_games;
+    @BindView(R.id.user_app_home_num_praise)
+    TextView user_app_home_num_praise;
+    @BindView(R.id.user_app_home_name)
+    TextView user_app_home_name;
+    @BindView(R.id.user_app_home_game_list)
+    RecyclerView user_app_home_game_list;
+
+    private int focus_user_id;
+    private TitleFragmentListAdapter mAdapter;
+
+    private ArrayList<GameInfoList> gameInfoListArrayList = ListUtil.emptyList();
+    @Override
+    public void initView() {
+        focus_user_id = DataUtil.getObject(getIntent(), Integer.class);
+
+        //viewPager
+        mAdapter = new TitleFragmentListAdapter(getSupportFragmentManager());
+        FgtUserAppHomeCommentList fgtUserAppHomeCommentList = new FgtUserAppHomeCommentList();
+        fgtUserAppHomeCommentList.setFocus_user_id(focus_user_id);
+        FgtUserAppHomeReplyList fgtUserAppHomeReplyList = new FgtUserAppHomeReplyList();
+        fgtUserAppHomeReplyList.setFocus_user_id(focus_user_id);
+        mAdapter.add(fgtUserAppHomeCommentList, "评论");
+        mAdapter.add(fgtUserAppHomeReplyList, "回复");
+        viewPager.setAdapter(mAdapter);
+        tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(viewPager));
+        tabLayout.setupWithViewPager(viewPager);
+        CommonUtil.getInstance().reflex(tabLayout, this);
+        //refresh
+        refresh.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
+
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                refreshData();
+            }
+
+            @Override
+            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+                loadMoreData();
+            }
+        });
+        RefreshUtil.newInstance().publicParameterLoadMore(refresh, this);
+
+
+        user_app_home_game_list.setHasFixedSize(true);
+        user_app_home_game_list.setNestedScrollingEnabled(false);
+        user_app_home_game_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        AdpGcGameAppInfoList adpGcGameAppInfoList = new AdpGcGameAppInfoList(gameInfoListArrayList);
+        adpGcGameAppInfoList.bindToRecyclerView(user_app_home_game_list);
+    }
+
+    @Override
+    public void initData() {
+        initDetailFromACache();
+        initGameListFromACache();
+        if (refresh != null) {
+            refresh.autoRefresh();
+        }
+    }
+    //从缓存获取用户主页详情
+    private void initDetailFromACache() {
+        UserFocus userFocus = DataUtil.getInstance().getCacheResult(ApiKey.getGameUserDetail(focus_user_id), UserFocus.class);
+        checkData(userFocus);
+    }
+    //从网络获取用户主页详情
+    private void initDetailFromNet() {
+        SheepApp.getInstance().getNetComponent().getApiService().getGameUserDetail(focus_user_id)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.getGameUserDetail(focus_user_id));
+                                if (isNewData) {
+                                    UserFocus userFocus = baseMessage.getData(UserFocus.class);
+                                    checkData(userFocus);
+                                }
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                if(TestUtil.isDev()) G.showToast(baseMessage);
+                            }
+                        });
+    }
+    //从缓存获取用户主页详情
+    private void initGameListFromACache() {
+        LatelyGame latelyGame = DataUtil.getInstance().getCacheResult(ApiKey.getGameUserLatelyGame(focus_user_id), LatelyGame.class);
+        checkLatelyGame(latelyGame);
+    }
+    //从网络获取最近游戏与同类游戏
+    private void initGameList() {
+        SheepApp.getInstance().getNetComponent().getApiService().getGameUserLatelyGame(focus_user_id)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.getGameUserLatelyGame(focus_user_id));
+                        if (isNewData) {
+                            LatelyGame latelyGame = baseMessage.getData(LatelyGame.class);
+                            checkLatelyGame(latelyGame);
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        if(TestUtil.isDev()) G.showToast(baseMessage);
+                    }
+                });
+    }
+    //检查数据
+    private void checkLatelyGame(LatelyGame latelyGame) {
+        if(latelyGame != null){
+            loadLatelyGame(latelyGame);
+        }
+    }
+    private List<GameApp> latelyGameList = ListUtil.emptyList();
+    private List<GameApp> sameGameList = ListUtil.emptyList();
+    public static final String NAME_LATELY = "在玩的游戏";
+    public static final String NAME_SAME = "同类游戏";
+    //加载最近游戏与同类游戏
+    private void loadLatelyGame(LatelyGame latelyGame) {
+        reloadList(latelyGameList, latelyGame.getLately(), NAME_LATELY);
+        reloadList(sameGameList, latelyGame.getSame(), NAME_SAME);
+        user_app_home_game_list.getAdapter().notifyDataSetChanged();
+    }
+    //重新加载列表
+    private void reloadList(List<GameApp> list, List<GameApp> addList, final String name) {
+        list.clear();
+        if(!ListUtil.isEmpty(addList)){
+            list.addAll(addList);
+        }
+        if(ListUtil.getItem(gameInfoListArrayList, new ListUtil.CallBack<GameInfoList, Boolean>() {
+            @Override
+            public Boolean call(GameInfoList gameInfoList) {
+                return TextUtils.equals(gameInfoList.getName(), name);
+            }
+        }) == null){
+            gameInfoListArrayList.add(new GameInfoList(name, new AdpGcGameAppList(SheepApp.getInstance(), R.layout.item_gc_game_app_63, list)).setHorizontal().setShowBottomLine(true).setShowTopLine(false));
+        }
+    }
+
+    //检查数据
+    private void checkData(UserFocus userFocus) {
+        if(userFocus == null){
+            resetView();
+        } else {
+            loadData(userFocus);
+        }
+    }
+
+    //方块化一些包含具体数据的TextView控件
+    private void resetView() {
+        ViewUtil.setDefaultText(user_app_home_name);
+        ViewUtil.setDefaultText(user_app_home_num_fans);
+        ViewUtil.setDefaultText(user_app_home_num_focus_users);
+        ViewUtil.setDefaultText(user_app_home_num_focus_games);
+        ViewUtil.setDefaultText(user_app_home_num_praise);
+    }
+    //加载数据
+    private void loadData(UserFocus userFocus) {
+        ViewUtil.setText(user_app_home_name, userFocus.getNick_name());
+        ViewUtil.setAvatar(user_app_home_avatar, userFocus.getAvatar());
+        ViewUtil.setText(user_app_home_num_fans, userFocus.getFan());
+        ViewUtil.setText(user_app_home_num_focus_users, userFocus.getFocus_user());
+        ViewUtil.setText(user_app_home_num_focus_games, userFocus.getFocus_game());
+        ViewUtil.setText(user_app_home_num_praise, userFocus.getLike());
+    }
+
+    //refreshData调用次数
+    private int refreshDataCount = 0;
+    //刷新数据
+    public void refreshData(){
+        initDetailFromNet();
+        initGameList();
+        boolean isRefresh = false;
+        if (refreshDataCount != 0) {
+            Fragment item = mAdapter.getItem(viewPager.getCurrentItem());
+            if (item instanceof IRefresh) {//可刷新,就调用当前fragment刷新数据
+                ((IRefresh) item).refreshData();
+                isRefresh = true;
+            }
+        }
+        refreshDataCount++;
+        if(!isRefresh)
+            notifyDataSetChanged();
+    }
+
+    //加载更多数据
+    private void loadMoreData() {
+        Fragment item = mAdapter.getItem(viewPager.getCurrentItem());
+        if (item instanceof ILoadMore) {//可加载更多,就调用当前fragment刷新数据
+            ((ILoadMore) item).loadMoreData();
+        } else {
+            notifyDataSetChanged();
+        }
+    }
+
+    //刷新完成
+    private void notifyDataSetChanged() {
+        if (refresh != null) {
+            refresh.finishRefresh();
+            refresh.finishLoadMore();
+        }
+    }
+
+    //点击返回
+    public void onClickBackImg(View view) {
+        finish();
+    }
+
+    //点击分享
+    public void onClickShareImg(View view) {
+        //TODO 点击分享游戏
+        G.showToast(R.string.coming_soon);
+    }
+
+}

+ 7 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppComment.java

@@ -57,5 +57,12 @@ public class AdpGcGameAppComment extends BaseQuickAdapter<UserComment, BaseViewH
                 Jump2View.getInstance().goActAppCommentDetail(ActivityManager.getInstance().currentActivity(), item.getId());
             }
         });
+        game_app_comment_user_avatar.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                //跳转个人游戏主页界面
+                Jump2View.getInstance().goActUserAppHome(ActivityManager.getInstance().currentActivity(), item.getUser_id());
+            }
+        });
     }
 }

+ 6 - 3
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppInfoList.java

@@ -1,7 +1,7 @@
 package com.sheep.gamegroup.view.adapter;
 
-import android.content.Context;
 import android.support.v7.widget.RecyclerView;
+import android.view.View;
 import android.widget.TextView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
@@ -21,17 +21,20 @@ import java.util.List;
  * 游戏详情中福利列表:游戏评分、文章推荐、活动推荐
  */
 public class AdpGcGameAppInfoList extends BaseQuickAdapter<GameInfoList, BaseViewHolder> {
-    public AdpGcGameAppInfoList(Context context, List<GameInfoList> datas) {
+    public AdpGcGameAppInfoList(List<GameInfoList> datas) {
         super(R.layout.item_gc_game_app_detail_list, datas);
     }
 
     @Override
     public void convert(BaseViewHolder viewHolder, final GameInfoList itemList) {
-//        View item_gc_game_app_list_top = viewHolder.itemView.findViewById(R.id.item_gc_game_app_list_top);
+        View item_gc_game_app_list_top = viewHolder.itemView.findViewById(R.id.item_gc_game_app_list_top);
+        View item_gc_game_app_list_bottom = viewHolder.itemView.findViewById(R.id.item_gc_game_app_list_bottom);
         TextView item_gc_game_app_list_tv = viewHolder.itemView.findViewById(R.id.item_gc_game_app_list_tv);
         TextView item_gc_game_app_list_more_tv = viewHolder.itemView.findViewById(R.id.item_gc_game_app_list_more_tv);
         RecyclerView recyclerView = viewHolder.itemView.findViewById(R.id.item_gc_game_app_list_rv);
 
+        ViewUtil.setVisibility(item_gc_game_app_list_top, itemList.isShowTopLine());
+        ViewUtil.setVisibility(item_gc_game_app_list_bottom, itemList.isShowBottomLine());
         ViewUtil.setText(item_gc_game_app_list_tv, itemList.getName());
         itemList.setMoreViewOnClickListener(item_gc_game_app_list_more_tv);
 

+ 38 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppList.java

@@ -0,0 +1,38 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.content.Context;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
+import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
+import com.sheep.gamegroup.model.entity.GameApp;
+import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/11/5.
+ * realicing@sina.com
+ */
+public class AdpGcGameAppList extends RecyclerViewAdapter<GameApp> {
+
+    public AdpGcGameAppList(Context context, int layoutId, List<GameApp> datas) {
+        super(context, layoutId, datas);
+    }
+
+    @Override
+    public void convert(ViewHolder viewHolder, GameApp item, int position) {
+        ImageView item_gc_game_app_iv = viewHolder.itemView.findViewById(R.id.item_gc_game_app_iv);
+        TextView item_gc_game_app_tv = viewHolder.itemView.findViewById(R.id.item_gc_game_app_tv);
+        if (item == null) {
+            ViewUtil.setDefaultText(item_gc_game_app_tv);
+        } else {
+            // 加载数据
+            ViewUtil.setText(item_gc_game_app_tv, item.getName());
+            GlideImageLoader.setGameImage(item_gc_game_app_iv, item.getIcon());
+        }
+    }
+}

+ 37 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpUserAppHomeComment.java

@@ -0,0 +1,37 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.view.View;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.model.entity.UserComment;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.util.viewHelper.UserCommentHelper;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/11/1.
+ * realicing@sina.com
+ * 用户主页评论列表adapter
+ */
+public class AdpUserAppHomeComment extends BaseQuickAdapter<UserComment, BaseViewHolder> {
+    public AdpUserAppHomeComment(List<UserComment> list) {
+        super(R.layout.item_user_app_home_comment, list);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder helper, final UserComment item) {
+        int position = helper.getAdapterPosition() - getHeaderLayoutCount();
+        View user_comment_detail_line_top = helper.itemView.findViewById(R.id.user_comment_detail_line_top);
+        ViewUtil.setVisibility(user_comment_detail_line_top, position != 0);
+        Object tag = helper.itemView.getTag();
+        UserCommentHelper headerViewHelper;
+        if(tag instanceof UserCommentHelper)
+            headerViewHelper= (UserCommentHelper) tag;
+        else
+            headerViewHelper = new UserCommentHelper(helper.itemView);
+        headerViewHelper.loadHeaderViewData(item);
+    }
+}

+ 60 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpUserAppHomeReply.java

@@ -0,0 +1,60 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.view.View;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.UserCommentWithReply;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.ApiUtil;
+import com.sheep.gamegroup.util.TextViewUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/11/1.
+ * realicing@sina.com
+ * 用户主页回复列表adapter
+ */
+public class AdpUserAppHomeReply extends BaseQuickAdapter<UserCommentWithReply, BaseViewHolder> {
+    public AdpUserAppHomeReply(List<UserCommentWithReply> list) {
+        super(R.layout.item_user_app_home_reply, list);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder helper, final UserCommentWithReply item) {
+        int position = helper.getAdapterPosition() - getHeaderLayoutCount();
+        View user_reply_detail_line_top = helper.itemView.findViewById(R.id.user_reply_detail_line_top);
+        final TextView user_reply_detail_num1 = helper.itemView.findViewById(R.id.user_reply_detail_num1);
+        View intro_1 = helper.itemView.findViewById(R.id.intro_1);
+        View intro_2 = helper.itemView.findViewById(R.id.intro_2);
+        ViewUtil.setVisibility(user_reply_detail_line_top, position != 0);
+        TextViewUtil.initIntroView(intro_1, item.getReplyShowAll().setMaxLine(5));
+        TextViewUtil.initIntroView(intro_2, item.getContentShowAll().setMaxLine(4));
+        ViewUtil.setText(user_reply_detail_num1, item.getLike());
+        user_reply_detail_num1.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                ApiUtil.postGameUserUserGameCommentLike(item.getUser_comment_id(), new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        item.setLike(item.getLike() + 1);
+                        ViewUtil.setText(user_reply_detail_num1, item.getLike());
+                        G.showToast(baseMessage);
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+                });
+            }
+        });
+    }
+}

+ 3 - 15
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppDetail.java

@@ -27,6 +27,7 @@ import com.sheep.gamegroup.util.TimeUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.AdpGcGameAppComment;
 import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoList;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppList;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
@@ -77,7 +78,7 @@ public class FgtGcGameAppDetail extends BaseRefreshLoadMoreFragment implements A
         gc_game_app_detail_info_list.setHasFixedSize(true);
         gc_game_app_detail_info_list.setNestedScrollingEnabled(false);
         gc_game_app_detail_info_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        gc_game_app_detail_info_list.setAdapter(new AdpGcGameAppInfoList(activity, gameInfoListArrayList));
+        gc_game_app_detail_info_list.setAdapter(new AdpGcGameAppInfoList(gameInfoListArrayList));
     }
 
     //ActGcGameAppDetail调用该方法传入对应的游戏数据
@@ -137,20 +138,7 @@ public class FgtGcGameAppDetail extends BaseRefreshLoadMoreFragment implements A
                     public void onNext(BaseMessage baseMessage) {
                         ArrayList<GameApp> newList = baseMessage.getDataList(GameApp.class);
                         if (!ListUtil.isEmpty(newList)) {
-                            gameInfoListArrayList.add(new GameInfoList(name, new RecyclerViewAdapter<GameApp>(SheepApp.getInstance(), R.layout.item_gc_game_app_63, newList) {
-                                @Override
-                                public void convert(ViewHolder viewHolder, GameApp item, int position) {
-                                    ImageView item_gc_game_app_iv = viewHolder.itemView.findViewById(R.id.item_gc_game_app_iv);
-                                    TextView item_gc_game_app_tv = viewHolder.itemView.findViewById(R.id.item_gc_game_app_tv);
-                                    if (item == null) {
-                                        ViewUtil.setDefaultText(item_gc_game_app_tv);
-                                    } else {
-                                        // 加载数据
-                                        ViewUtil.setText(item_gc_game_app_tv, item.getName());
-                                        GlideImageLoader.setGameImage(item_gc_game_app_iv, item.getIcon());
-                                    }
-                                }
-                            }, onClickListener).setHorizontal().setSort(sort));
+                            gameInfoListArrayList.add(new GameInfoList(name, new AdpGcGameAppList(SheepApp.getInstance(), R.layout.item_gc_game_app_63, newList), onClickListener).setHorizontal().setSort(sort));
                             Collections.sort(gameInfoListArrayList);
                             gc_game_app_detail_info_list.getAdapter().notifyDataSetChanged();
                         }

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGcGameAppWelfare.java

@@ -58,7 +58,7 @@ public class FgtGcGameAppWelfare extends BaseRefreshLoadMoreFragment {
         recyclerView.setHasFixedSize(true);
         recyclerView.setNestedScrollingEnabled(false);
         recyclerView.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        AdpGcGameAppInfoList adpGcGameAppInfoList = new AdpGcGameAppInfoList(activity, gameInfoListArrayList);
+        AdpGcGameAppInfoList adpGcGameAppInfoList = new AdpGcGameAppInfoList(gameInfoListArrayList);
         adpGcGameAppInfoList.bindToRecyclerView(recyclerView);
         adpGcGameAppInfoList.setEmptyView(R.layout.include_empty_view);
 

+ 71 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtUserAppHomeCommentList.java

@@ -0,0 +1,71 @@
+package com.sheep.gamegroup.view.fragment;
+
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.UserComment;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdpUserAppHomeComment;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.Locale;
+
+import rx.Observable;
+
+/**
+ * Created by realicing on 2018/11/6.
+ * realicing@sina.com
+ * 用户游戏主页--子页面--评论
+ */
+public class FgtUserAppHomeCommentList extends BaseListFragment3<UserComment>{
+
+    private TextView headerView;
+    @Override
+    public void initView() {
+        super.initView();
+        headerView = (TextView) LayoutInflater.from(SheepApp.getInstance()).inflate(R.layout.include_total_count_tv, null);
+        if(headerView != null){
+            ViewUtil.setText(headerView, getString(R.string.total_x_comment, ViewUtil.BLOCK));
+        }
+    }
+
+    @Override
+    protected RecyclerView.Adapter getAdapter() {
+        AdpUserAppHomeComment adpUserAppHomeComment = new AdpUserAppHomeComment(list);
+        adpUserAppHomeComment.addHeaderView(headerView);
+        return adpUserAppHomeComment;
+    }
+
+    private int focus_user_id;
+
+    public void setFocus_user_id(int focus_user_id) {
+        this.focus_user_id = focus_user_id;
+    }
+
+    @Override
+    protected String getKey(int page, int per_page) {
+        return String.format(Locale.CHINA, "app/game_user/comment_list?page_no=%d&page_size=%d&focus_user_id=%d", page, per_page, focus_user_id);
+    }
+
+    @Override
+    protected Observable<BaseMessage> getApi(ApiService apiService) {
+        return apiService.getGameUserCommentList(page, per_page, focus_user_id);
+    }
+
+    @Override
+    protected Class<UserComment> getTClass() {
+        return UserComment.class;
+    }
+
+    @Override
+    public void notifyDataSetChanged() {
+        if(lastMessage != null && headerView != null){
+            ViewUtil.setText(headerView, getString(R.string.total_x_comment, String.valueOf(lastMessage.getTotal())));
+        }
+        super.notifyDataSetChanged();
+    }
+}

+ 72 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtUserAppHomeReplyList.java

@@ -0,0 +1,72 @@
+package com.sheep.gamegroup.view.fragment;
+
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.UserCommentWithReply;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdpUserAppHomeReply;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.Locale;
+
+import rx.Observable;
+
+/**
+ * Created by realicing on 2018/11/6.
+ * realicing@sina.com
+ * 用户游戏主页--子页面--回复
+ */
+public class FgtUserAppHomeReplyList extends BaseListFragment3<UserCommentWithReply> {
+
+    private TextView headerView;
+
+    @Override
+    public void initView() {
+        super.initView();
+        headerView = (TextView) LayoutInflater.from(SheepApp.getInstance()).inflate(R.layout.include_total_count_tv, null);
+        if (headerView != null) {
+            ViewUtil.setText(headerView, getString(R.string.total_x_reply, ViewUtil.BLOCK));
+        }
+    }
+
+    @Override
+    protected RecyclerView.Adapter getAdapter() {
+        AdpUserAppHomeReply adapter = new AdpUserAppHomeReply(list);
+        adapter.addHeaderView(headerView);
+        return adapter;
+    }
+
+    private int focus_user_id;
+
+    public void setFocus_user_id(int focus_user_id) {
+        this.focus_user_id = focus_user_id;
+    }
+
+    @Override
+    protected String getKey(int page, int per_page) {
+        return String.format(Locale.CHINA, "app/game_user/reply_list?page_no=%d&page_size=%d&focus_user_id=%d", page, per_page, focus_user_id);
+    }
+
+    @Override
+    protected Observable<BaseMessage> getApi(ApiService apiService) {
+        return apiService.getGameUserReplyList(page, per_page, focus_user_id);
+    }
+
+    @Override
+    protected Class<UserCommentWithReply> getTClass() {
+        return UserCommentWithReply.class;
+    }
+
+    @Override
+    public void notifyDataSetChanged() {
+        if (lastMessage != null && headerView != null) {
+            ViewUtil.setText(headerView, getString(R.string.total_x_reply, String.valueOf(lastMessage.getTotal())));
+        }
+        super.notifyDataSetChanged();
+    }
+}

+ 46 - 80
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtUserCommentDetail.java

@@ -1,21 +1,16 @@
 package com.sheep.gamegroup.view.fragment;
 
 import android.support.annotation.NonNull;
-import android.support.v7.widget.AppCompatRatingBar;
 import android.support.v7.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.EditText;
-import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
-import android.widget.TextView;
 
 import com.scwang.smartrefresh.layout.SmartRefreshLayout;
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
 import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
-import com.sheep.gamegroup.absBase.BaseListActivity2;
-import com.sheep.gamegroup.dateview.DateUtil;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserComment;
@@ -23,13 +18,11 @@ import com.sheep.gamegroup.model.entity.UserCommentDetail;
 import com.sheep.gamegroup.model.entity.UserCommentReply;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.ApiJSONUtil;
-import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.RefreshUtil;
 import com.sheep.gamegroup.util.TestUtil;
-import com.sheep.gamegroup.util.TextViewUtil;
-import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.util.viewHelper.UserCommentHelper;
 import com.sheep.gamegroup.view.adapter.AdpUserCommentReply;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -60,6 +53,7 @@ public class FgtUserCommentDetail extends BaseListFragment3<UserCommentReply> {
     SmartRefreshLayout refresh;
     @BindView(R.id.bottom)
     RelativeLayout bottom;
+
     @Override
     public void initView() {
         TitleBarUtils.getInstance().setTitle(mView, "回复详情")
@@ -95,88 +89,49 @@ public class FgtUserCommentDetail extends BaseListFragment3<UserCommentReply> {
         });
 
     }
-//    ------------------------------start header------------------------------------
+
+    //    ------------------------------start header------------------------------------
+    private UserCommentHelper headerViewHelper;
+
     private LinearLayout user_comment_detail_game_ll;
-    private TextView user_comment_detail_game_name;
-    private ImageView user_comment_detail_game_icon;
-    private ImageView user_comment_detail_user_avatar;
-    private TextView user_comment_detail_user_name;
-    private TextView user_comment_detail_user_publish_time;
-    private AppCompatRatingBar user_comment_detail_user_publish_score;
-    private TextView user_comment_detail_num1;
-    private TextView user_comment_detail_num2;
-    private TextView user_comment_detail_num3;
     //初始化headerView
     private void initHeaderView() {
-        headerView = LayoutInflater.from(SheepApp.getInstance()).inflate(R.layout.header_user_comment_detail, null);
-
-        user_comment_detail_game_ll = headerView.findViewById(R.id.user_comment_detail_game_ll);
-        user_comment_detail_game_name = headerView.findViewById(R.id.user_comment_detail_game_name);
-        user_comment_detail_game_icon = headerView.findViewById(R.id.user_comment_detail_game_icon);
-        user_comment_detail_user_avatar = headerView.findViewById(R.id.user_comment_detail_user_avatar);
-        user_comment_detail_user_name = headerView.findViewById(R.id.user_comment_detail_user_name);
-        user_comment_detail_user_publish_time = headerView.findViewById(R.id.user_comment_detail_user_publish_time);
-        user_comment_detail_user_publish_score = headerView.findViewById(R.id.user_comment_detail_user_publish_score);
-        user_comment_detail_num1 = headerView.findViewById(R.id.user_comment_detail_num1);
-        user_comment_detail_num2 = headerView.findViewById(R.id.user_comment_detail_num2);
-        user_comment_detail_num3 = headerView.findViewById(R.id.user_comment_detail_num3);
-    }
-    //加载数据
-    private void loadHeaderViewData(final UserComment user_comment){
-        user_comment_detail_game_ll.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                //点击游戏
-                if(user_comment != null)
-                    Jump2View.getInstance().goPlayGameDetail(activity, user_comment.getApp_id());
-                else
-                    G.showToast(R.string.loading_data);
-            }
-        });
-        user_comment_detail_user_publish_score.setMax(10);
-        user_comment_detail_user_publish_score.setProgress(user_comment.getScore());
-        ViewUtil.setText(user_comment_detail_num1, user_comment.getComment());
-        ViewUtil.setText(user_comment_detail_num2, user_comment.getLike());
-        ViewUtil.setText(user_comment_detail_num3, user_comment.getExpression());
-        ViewUtil.setText(user_comment_detail_game_name, user_comment.getApp_name());
-        ViewUtil.setText(user_comment_detail_user_name, user_comment.getNickname());
-        user_comment_detail_user_publish_time.setText(DateUtil.getTimeText(user_comment.getCreate_time()));
-        ViewUtil.setGameImage(user_comment_detail_game_icon, user_comment.getApp_icon());
-        ViewUtil.setAvatar(user_comment_detail_user_avatar, user_comment.getAvatar());
-        TextViewUtil.initIntroView(headerView, user_comment.getShowAll(), "全文");
+        headerViewHelper = new UserCommentHelper(R.layout.header_user_comment_detail);
+        user_comment_detail_game_ll = headerViewHelper.getRootView().findViewById(R.id.user_comment_detail_game_ll);
     }
 
-//    ------------------------------end header------------------------------------
+    //    ------------------------------end header------------------------------------
     //用户评论一个用户对游戏的评论
     private void commitContent(String content) {
-        if(TestUtil.isDev()) G.showToast("评论内容:" + content);
-        if(content.isEmpty()){
+        if (TestUtil.isDev()) G.showToast("评论内容:" + content);
+        if (content.isEmpty()) {
             G.showToast("评论内容不能为空");
             return;
         }
         // 发表评论
         ApiJSONUtil.postGameUserUserComment(user_comment_id, false, content)
-                        .subscribeOn(Schedulers.io())
-                        .observeOn(AndroidSchedulers.mainThread())
-                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                            @Override
-                            public void onNext(BaseMessage baseMessage) {
-                                G.showToast(baseMessage);
-                            }
-
-                            @Override
-                            public void onError(BaseMessage baseMessage) {
-                                G.showToast(baseMessage);
-                            }
-                        });
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+                });
     }
+
     //输入框
     private EditText bottom_user_comment_detail_input;
 
-    private View headerView;
     private View footerView;
 
     private int user_comment_id;
+
     public void setUser_comment_id(int user_comment_id) {
         this.user_comment_id = user_comment_id;
     }
@@ -187,11 +142,12 @@ public class FgtUserCommentDetail extends BaseListFragment3<UserCommentReply> {
     }
 
     private AdpUserCommentReply adapter;
+
     @Override
     protected RecyclerView.Adapter getAdapter() {
         //用户评论的回复列表
         adapter = new AdpUserCommentReply(list);
-        adapter.addHeaderView(headerView);
+        adapter.addHeaderView(headerViewHelper.getRootView());
         return adapter;
     }
 
@@ -207,12 +163,22 @@ public class FgtUserCommentDetail extends BaseListFragment3<UserCommentReply> {
 
     @Override
     protected List<UserCommentReply> resolveData(BaseMessage baseMessage, int page) {
-        UserCommentDetail userCommentDetail = baseMessage.getData(UserCommentDetail.class);
-        if(page == 0){
+        final UserCommentDetail userCommentDetail = baseMessage.getData(UserCommentDetail.class);
+        if (page == 0) {
             adapter.setUserComment(userCommentDetail.getUser_comment());
-            loadHeaderViewData(userCommentDetail.getUser_comment());
+            headerViewHelper.loadHeaderViewData(userCommentDetail.getUser_comment());
+            user_comment_detail_game_ll.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    //点击游戏
+                    if(userCommentDetail.getUser_comment() != null)
+                        Jump2View.getInstance().goPlayGameDetail(activity, userCommentDetail.getUser_comment().getApp_id());
+                    else
+                        G.showToast(R.string.loading_data);
+                }
+            });
         }
-        if(userCommentDetail != null && userCommentDetail.getUser_comment_reply() != null && userCommentDetail.getUser_comment_reply().getReply_list() != null)
+        if (userCommentDetail != null && userCommentDetail.getUser_comment_reply() != null && userCommentDetail.getUser_comment_reply().getReply_list() != null)
             return userCommentDetail.getUser_comment_reply().getReply_list();
         return ListUtil.emptyList();
     }
@@ -224,12 +190,12 @@ public class FgtUserCommentDetail extends BaseListFragment3<UserCommentReply> {
 
     @Override
     protected void updateEmptyView() {
-        if(adapter != null){
-            if(list.isEmpty()) {
-                if(footerView.getParent() == null)//未添加尾部view
+        if (adapter != null) {
+            if (list.isEmpty()) {
+                if (footerView.getParent() == null)//未添加尾部view
                     adapter.addFooterView(footerView);
             } else {
-                if(footerView.getParent() != null)//已经添加尾部view
+                if (footerView.getParent() != null)//已经添加尾部view
                     adapter.removeFooterView(footerView);
             }
         }

+ 56 - 36
app/src/main/java/org/afinal/simplecache/ApiKey.java

@@ -6,22 +6,22 @@ import java.util.Locale;
  * Created by realicing on 2018/7/23.
  * realicing@sina.com
  * 07-23 11:59:21.130 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/version/new_version?type=0
- 07-23 11:59:21.524 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/advertising/advertisements?type=1
- 07-23 11:59:23.512 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/get_info/
- 07-23 11:59:23.660 7444-7548/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/check_label
- 07-23 11:59:23.813 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/version/new_version?type=0
- 07-23 11:59:24.053 7444-7648/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/get_info/
- 07-23 11:59:24.056 7444-7653/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/slideshow?platform=1
- 07-23 11:59:24.056 7444-7651/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/bulletin?page=1&per_page=10
- 07-23 11:59:24.070 7444-7657/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/url/
- 07-23 11:59:24.077 7444-7649/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/award_detail?page=0&per_page=100
- 07-23 11:59:24.081 7444-7658/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/articles_tags/list
- 07-23 11:59:24.084 7444-7656/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/home_list
- 07-23 11:59:24.092 7444-7650/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/release_task?page=1&per_page=100&platform=1&is_hot=1&is_recommend=0&about_to_begin=0&task_type=-1&is_succession=3
- 07-23 11:59:24.095 7444-7547/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/advertising/advertisements?type=2
- 07-23 11:59:24.329 7444-7653/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/applications/downloads/status
- 07-23 11:59:24.371 7444-7547/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/accepted_task/new_run_task/?is_succession=3
- 07-23 11:59:24.634 7444-7651/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/articles/list?page=1&per_page=100&tag_id=0
+ * 07-23 11:59:21.524 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/advertising/advertisements?type=1
+ * 07-23 11:59:23.512 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/get_info/
+ * 07-23 11:59:23.660 7444-7548/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/check_label
+ * 07-23 11:59:23.813 7444-7517/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/version/new_version?type=0
+ * 07-23 11:59:24.053 7444-7648/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/get_info/
+ * 07-23 11:59:24.056 7444-7653/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/slideshow?platform=1
+ * 07-23 11:59:24.056 7444-7651/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/bulletin?page=1&per_page=10
+ * 07-23 11:59:24.070 7444-7657/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/url/
+ * 07-23 11:59:24.077 7444-7649/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/user/award_detail?page=0&per_page=100
+ * 07-23 11:59:24.081 7444-7658/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/articles_tags/list
+ * 07-23 11:59:24.084 7444-7656/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/home_list
+ * 07-23 11:59:24.092 7444-7650/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/release_task?page=1&per_page=100&platform=1&is_hot=1&is_recommend=0&about_to_begin=0&task_type=-1&is_succession=3
+ * 07-23 11:59:24.095 7444-7547/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/advertising/advertisements?type=2
+ * 07-23 11:59:24.329 7444-7653/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/applications/downloads/status
+ * 07-23 11:59:24.371 7444-7547/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/accepted_task/new_run_task/?is_succession=3
+ * 07-23 11:59:24.634 7444-7651/com.sheep.jiuyan.samllsheep I/System.out: sheepLog aCache key = app/find/articles/list?page=1&per_page=100&tag_id=0
  */
 public class ApiKey {
     //公告
@@ -42,65 +42,85 @@ public class ApiKey {
     public static final String my_games = "app/game_consumption/my_games?page=1&per_page=100";
     //首页获取所有发布的热门任务(试玩任务、游戏任务、连续任务)
     public static final String release_task = "app/release_task?page=1&per_page=100&platform=1&is_hot=1&is_recommend=0&about_to_begin=0&task_type=-1&is_succession=3";
-    public static String release_task(int page, int per_page, int about_to_begin, String task_type, int is_succession){
+
+    public static String release_task(int page, int per_page, int about_to_begin, String task_type, int is_succession) {
         task_type = task_type.replaceAll(",", "%2C");
         return String.format(Locale.CHINA, "app/release_task?page=%d&per_page=%d&platform=1&is_hot=0&is_recommend=0&about_to_begin=%d&task_type=%s&is_succession=%d", page, per_page, about_to_begin, task_type, is_succession);
     }
+
     //获取正在运行的任务(试玩任务、游戏任务、连续任务)
-    public static String new_run_task(int is_succession, int show_game_task){
+    public static String new_run_task(int is_succession, int show_game_task) {
         return String.format(Locale.CHINA, "app/accepted_task/new_run_task/?is_succession=%d&show_game_task=%d", is_succession, show_game_task);
     }
+
     //发现模块标签列表
     public static final String articles_tags = "app/find/articles_tags/list";
+
     //发现模块发现列表
-    public static String articles(int page, int per_page, int tag_id){
+    public static String articles(int page, int per_page, int tag_id) {
         return String.format(Locale.CHINA, "app/find/articles/list?page=%d&per_page=%d&tag_id=%d", page, per_page, tag_id);
     }
+
     //发现模块资讯
-    public static String articlesItem(int id){
-        return "app/find/articles?id="+id;
+    public static String articlesItem(int id) {
+        return "app/find/articles?id=" + id;
     }
+
     //发现模块游戏或应用详情
-    public static String applications(int id){
-        return "app/find/applications?id="+id;
+    public static String applications(int id) {
+        return "app/find/applications?id=" + id;
     }
+
     //发现模块游戏或应用详情中的分数
-    public static String score_num(int id){
-        return "app/find/applications/score_num?id="+id;
+    public static String score_num(int id) {
+        return "app/find/applications/score_num?id=" + id;
     }
+
     //发现模块游戏或应用详情中我的评分
-    public static String my_score(int id){
-        return "app/find/applications/my_score?id="+id;
+    public static String my_score(int id) {
+        return "app/find/applications/my_score?id=" + id;
     }
+
     //广告
-    public static String advertisements(int type){
-        return "app/advertising/advertisements?type="+type;
+    public static String advertisements(int type) {
+        return "app/advertising/advertisements?type=" + type;
     }
+
     //获取任务详情
-    public static String releaseTaskDesc(int releaseTaskId){
+    public static String releaseTaskDesc(int releaseTaskId) {
         return String.format(Locale.CHINA, "app/release_task/%d/desc", releaseTaskId);
     }
+
     //获取任务详情
-    public static String oldEqualsNew(String key){
-        return key+"oldEqualsNew";
+    public static String oldEqualsNew(String key) {
+        return key + "oldEqualsNew";
     }
 
     //看点
-    public static String awakenApp(){
+    public static String awakenApp() {
         return "app/awaken/article";
     }
+
     //看点
-    public static String awakenArticle(int page, int per_page){
+    public static String awakenArticle(int page, int per_page) {
         return String.format(Locale.CHINA, "app/awaken/article?page=%d&per_page=%d", page, per_page);
     }
+
     //发现模块游戏或应用详情
-    public static String playGameDetail(int id){
-        return "app/find?id="+id;
+    public static String playGameDetail(int id) {
+        return "app/find?id=" + id;
     }
+
     public static final String slideshowGame = "app/game_banner?platform=1";
     public static final String friend_count_and_award = "app/user/friend_count_and_award";
     public static final String MY_ASSETS = "app/user/my_assets";
     public static final String FRIEND_COUNT_AND_AWARD = "app/user/friend_count_and_award";
     public static final String CAN_RECEIVE_AWARD = "app/user/can_receive_award";
 
+    public static String getGameUserDetail(int focus_user_id) {
+        return "app/game_user/detail?focus_user_id=" + focus_user_id;
+    }
+    public static String getGameUserLatelyGame(int focus_user_id) {
+        return "app/game_user/lately_game?focus_user_id=" + focus_user_id;
+    }
 }

+ 218 - 0
app/src/main/res/layout/act_user_app_home.xml

@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="utf-8"?>
+<com.scwang.smartrefresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/refresh"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white"
+    tools:context="com.sheep.gamegroup.view.activity.ActUserAppHome">
+
+    <android.support.v4.widget.NestedScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_gravity="fill_vertical"
+        android:fillViewport="true"
+        android:scrollbars="none"
+        app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+        <android.support.constraint.ConstraintLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent">
+
+
+            <ImageView
+                android:id="@+id/user_app_home_bg"
+                android:layout_width="match_parent"
+                android:layout_height="160dp"
+                android:scaleType="centerCrop"
+                android:src="@drawable/icon"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <ImageView
+                android:layout_width="?attr/actionBarSize"
+                android:layout_height="?attr/actionBarSize"
+                android:layout_marginTop="@dimen/status_bar_height"
+                android:gravity="center_vertical"
+                android:onClick="onClickBackImg"
+                android:scaleType="centerInside"
+                android:src="@drawable/narrow_back_white"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+
+            <ImageView
+                android:layout_width="?attr/actionBarSize"
+                android:layout_height="?attr/actionBarSize"
+                android:layout_alignParentEnd="true"
+                android:layout_marginTop="@dimen/status_bar_height"
+                android:gravity="center_vertical"
+                android:onClick="onClickShareImg"
+                android:scaleType="centerInside"
+                android:src="@drawable/ic_but_share_white"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintTop_toTopOf="parent" />
+            <TextView
+                android:layout_width=""
+                android:layout_height="" />
+            <!--添加user_app_home_line, 只是为了让它下面的布局与 user_app_home_bg 的底部对齐-->
+            <View
+                android:id="@+id/user_app_home_line"
+                android:layout_width="match_parent"
+                android:layout_height="1px"
+                app:layout_constraintBottom_toBottomOf="@id/user_app_home_bg" />
+
+            <ImageView
+                android:id="@+id/user_app_home_avatar"
+                android:layout_width="60dp"
+                android:layout_height="60dp"
+                android:layout_marginBottom="8dp"
+                android:src="@drawable/icon"
+                app:layout_constraintBottom_toBottomOf="@id/user_app_home_line"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toTopOf="@id/user_app_home_line" />
+
+            <TextView
+                android:id="@+id/user_app_home_name"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="8dp"
+                android:text="栗子的菜"
+                android:textColor="#ff333333"
+                android:textSize="13sp"
+                app:layout_constraintEnd_toEndOf="parent"
+                app:layout_constraintStart_toStartOf="parent"
+                app:layout_constraintTop_toBottomOf="@id/user_app_home_avatar" />
+
+            <LinearLayout
+                android:id="@+id/user_app_home_ll"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="20dp"
+                android:gravity="center_vertical"
+                android:orientation="horizontal"
+                android:paddingStart="10dp"
+                android:paddingEnd="10dp"
+                app:layout_constraintTop_toBottomOf="@id/user_app_home_name">
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center_horizontal"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:id="@+id/user_app_home_num_fans"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:gravity="center"
+                        android:text="@string/x"
+                        android:textColor="#ff333333"
+                        android:textSize="15sp" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="10dp"
+                        android:gravity="center"
+                        android:text="@string/my_fans"
+                        android:textColor="#999999"
+                        android:textSize="13sp" />
+                </LinearLayout>
+
+                <View
+                    android:layout_width="1dp"
+                    android:layout_height="15dp"
+                    android:background="#f5f5f5" />
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center_horizontal"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:id="@+id/user_app_home_num_focus_users"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:gravity="center"
+                        android:text="@string/x"
+                        android:textColor="#ff333333"
+                        android:textSize="15sp" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="10dp"
+                        android:gravity="center"
+                        android:text="@string/focus_users"
+                        android:textColor="#999999"
+                        android:textSize="13sp" />
+                </LinearLayout>
+
+                <View
+                    android:layout_width="1dp"
+                    android:layout_height="15dp"
+                    android:background="#f5f5f5" />
+
+                <LinearLayout
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:gravity="center_horizontal"
+                    android:orientation="vertical">
+
+                    <TextView
+                        android:id="@+id/user_app_home_num_focus_games"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:gravity="center"
+                        android:text="@string/x"
+                        android:textColor="#ff333333"
+                        android:textSize="15sp" />
+
+                    <TextView
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="10dp"
+                        android:gravity="center"
+                        android:text="@string/focus_games"
+                        android:textColor="#999999"
+                        android:textSize="13sp" />
+                </LinearLayout>
+            </LinearLayout>
+
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/user_app_home_game_list"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                app:layout_constraintTop_toBottomOf="@id/user_app_home_ll" />
+
+            <android.support.design.widget.TabLayout
+                android:id="@+id/tabLayout"
+                style="@style/style_tab"
+                android:layout_height="48dp"
+                app:layout_constraintTop_toBottomOf="@id/user_app_home_game_list"
+                app:tabIndicatorHeight="2dp" />
+
+            <include
+                layout="@layout/line_1px_hor"
+                app:layout_constraintTop_toBottomOf="@id/tabLayout" />
+
+
+            <com.kfzs.android.view.widget.WrapContentHeightViewPager
+                android:id="@+id/viewPager"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_marginTop="@dimen/content_padding_15"
+                android:minHeight="@dimen/view_size_100"
+                app:layout_behavior="@string/appbar_scrolling_view_behavior"
+                app:layout_constraintTop_toBottomOf="@id/tabLayout" />
+
+        </android.support.constraint.ConstraintLayout>
+    </android.support.v4.widget.NestedScrollView>
+
+</com.scwang.smartrefresh.layout.SmartRefreshLayout>

+ 1 - 9
app/src/main/res/layout/header_user_comment_detail.xml

@@ -196,13 +196,5 @@
         android:layout_marginEnd="16dp"
         android:background="#f2f2f2" />
 
-    <TextView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="共20条评论"
-        android:paddingStart="16dp"
-        android:paddingEnd="16dp"
-        android:textColor="#ff333333"
-        android:textSize="13sp"
-        android:textStyle="bold" />
+    <include layout="@layout/include_total_count_tv"/>
 </LinearLayout>

+ 36 - 0
app/src/main/res/layout/include_intro.xml

@@ -0,0 +1,36 @@
+<?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:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <TextView
+        android:id="@+id/intro_content"
+        android:layout_width="match_parent"
+        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:paddingBottom="10dp"
+        android:text="《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。"
+        android:textColor="#ff666666"
+        android:textSize="12sp"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/intro_show_all"
+        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_constraintEnd_toEndOf="parent" />
+</android.support.constraint.ConstraintLayout>

+ 11 - 0
app/src/main/res/layout/include_total_count_tv.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/total_count_tv"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:paddingStart="16dp"
+    android:paddingEnd="16dp"
+    android:text="@string/total_x_comment"
+    android:textColor="#ff333333"
+    android:textSize="13sp"
+    android:textStyle="bold" />

+ 6 - 0
app/src/main/res/layout/item_gc_game_app_detail_list.xml

@@ -30,4 +30,10 @@
         android:id="@+id/item_gc_game_app_list_rv"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"/>
+    <View
+        android:id="@+id/item_gc_game_app_list_bottom"
+        android:layout_width="match_parent"
+        android:layout_height="10dp"
+        android:background="#f5f5f5"
+        android:visibility="gone"/>
 </LinearLayout>

+ 181 - 0
app/src/main/res/layout/item_user_app_home_comment.xml

@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <View
+        android:id="@+id/user_comment_detail_line_top"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:background="#f2f2f2" />
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content">
+
+        <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" />
+
+        <TextView
+            android:id="@+id/user_comment_detail_user_name"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="50dp"
+            android:layout_marginTop="18dp"
+            android:layout_marginEnd="36dp"
+            android:text="栗子的菜"
+            android:textColor="#ff333333"
+            android:textSize="13sp" />
+
+        <TextView
+            android:id="@+id/user_comment_detail_user_publish_time"
+            android:layout_width="match_parent"
+            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">
+
+        <ImageView
+            android:id="@+id/user_comment_detail_game_icon"
+            android:layout_width="33dp"
+            android:layout_height="33dp"
+            android:layout_marginStart="16dp"
+            android:layout_marginTop="16dp"
+            android:src="@drawable/icon_lj"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/user_comment_detail_game_name"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="8dp"
+            android:layout_marginTop="14dp"
+            android:layout_marginEnd="8dp"
+            android:ellipsize="end"
+            android:maxLines="1"
+            android:text="永恒仙域"
+            android:textColor="#ff333333"
+            android:textSize="13sp"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toEndOf="@id/user_comment_detail_game_icon"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <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_marginTop="38dp"
+            android:isIndicator="true"
+            android:numStars="5"
+            android:rating="0"
+            android:stepSize="0.5"
+            app:layout_constraintStart_toStartOf="@id/user_comment_detail_game_name"
+            app:layout_constraintTop_toTopOf="parent" />
+
+
+        <TextView
+            android:id="@+id/intro_content"
+            android:layout_width="match_parent"
+            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:paddingBottom="10dp"
+            android:text="《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。《永恒仙域》经典仙侠梦想,高清3DMMORPG手游,继承同类型游戏的经典游戏模式,更加酷炫的游戏画面与动作特效,精心构建出这个瑰丽的东方式仙侠世界。"
+            android:textColor="#ff666666"
+            android:textSize="12sp"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toBottomOf="@id/user_comment_detail_user_publish_score" />
+
+        <TextView
+            android:id="@+id/intro_show_all"
+            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_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:drawablePadding="6dp"
+            android:paddingStart="8dp"
+            android:paddingTop="8dp"
+            android:paddingEnd="12dp"
+            android:paddingBottom="16dp"
+            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_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" />
+    </android.support.constraint.ConstraintLayout>
+
+
+</LinearLayout>

+ 63 - 0
app/src/main/res/layout/item_user_app_home_reply.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <View
+        android:id="@+id/user_reply_detail_line_top"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginStart="16dp"
+        android:layout_marginEnd="16dp"
+        android:background="#f2f2f2" />
+
+
+    <RelativeLayout
+        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">
+
+        <include
+            android:id="@+id/intro_1"
+            layout="@layout/include_intro" />
+
+        <View
+            android:id="@+id/intro_line"
+            android:layout_width="match_parent"
+            android:layout_height="1dp"
+            android:layout_below="@id/intro_1"
+            android:layout_marginStart="16dp"
+            android:layout_marginTop="10dp"
+            android:layout_marginEnd="16dp"
+            android:background="#e6e6e6" />
+
+        <include
+            android:id="@+id/intro_2"
+            layout="@layout/include_intro"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/intro_line" />
+
+        <TextView
+            android:id="@+id/user_reply_detail_num1"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_below="@id/intro_2"
+            android:layout_alignParentEnd="true"
+            android:drawableStart="@drawable/ic_but_up"
+            android:drawablePadding="6dp"
+            android:paddingStart="8dp"
+            android:paddingTop="8dp"
+            android:paddingEnd="12dp"
+            android:paddingBottom="16dp"
+            android:text="54"
+            android:textColor="#ff666666"
+            android:textSize="11sp" />
+
+    </RelativeLayout>
+</LinearLayout>

+ 7 - 0
app/src/main/res/values/strings.xml

@@ -113,4 +113,11 @@
     <string name="search_but_text">搜索</string>
     <string name="search_hint_txt">搜索任务名称/游戏名称</string>
     <string name="new_nav_tips_title">亲爱的羊羊伙伴:\n\n  为了让你赚更多的钱,羊羊平台经过仔细整理,特整理出如下新手引导及赚钱攻略,按此攻略可赚取更多的钱!具体攻略如下:</string>
+
+    <string name="my_fans">我的粉丝</string>
+    <string name="focus_users">关注的人</string>
+    <string name="focus_games">关注的游戏</string>
+    <string name="x">%s</string>
+    <string name="total_x_comment">共%s条评论</string>
+    <string name="total_x_reply">共%s条回复</string>
 </resources>

+ 2 - 1
view/src/main/java/com/kfzs/android/view/widget/WrapContentHeightViewPager.java

@@ -4,6 +4,7 @@ import android.content.Context;
 import android.support.v4.view.ViewPager;
 import android.util.AttributeSet;
 import android.view.View;
+import android.view.ViewGroup;
 import android.widget.LinearLayout;
 
 /**
@@ -45,7 +46,7 @@ public class WrapContentHeightViewPager extends ViewPager {
             public void onPageSelected(int position) {
                 View view = getChildAt(position);
                 int height = view.getMeasuredHeight();
-                LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) getLayoutParams();
+                ViewGroup.LayoutParams layoutParams = getLayoutParams();
                 layoutParams.height = height;
                 setLayoutParams(layoutParams);
             }