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

Merge branch 'sheep_develop' of 10.8.230.114:xmy_android/small_sheep_android into sheep_develop

hanjing лет назад: 7
Родитель
Сommit
7df6762afa
46 измененных файлов с 1930 добавлено и 316 удалено
  1. 4 0
      app/src/main/AndroidManifest.xml
  2. 10 0
      app/src/main/java/com/kfzs/duanduan/utils/NumberFormatUtils.java
  3. 3 7
      app/src/main/java/com/sheep/gamegroup/helper/ImageListHelper.java
  4. 1 1
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  5. 31 1
      app/src/main/java/com/sheep/gamegroup/model/entity/Applications.java
  6. 1 1
      app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameCenterType.java
  7. 476 0
      app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameGroupOrGameDetail.java
  8. 1 1
      app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameRank.java
  9. 1 2
      app/src/main/java/com/sheep/gamegroup/module/game/activity/ActSearchGameGroup.java
  10. 45 0
      app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpGameCenterTypeList2.java
  11. 45 0
      app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpGameGroupGameCompare.java
  12. 10 20
      app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpSearchResp.java
  13. 13 0
      app/src/main/java/com/sheep/gamegroup/module/game/api/IGameGroup.java
  14. 3 3
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameCenter.java
  15. 14 88
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameCenterType.java
  16. 242 0
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameComment.java
  17. 237 0
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameDetail.java
  18. 153 0
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameWelfare.java
  19. 1 1
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtMyGameList.java
  20. 6 12
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtPlayGame.java
  21. 35 4
      app/src/main/java/com/sheep/gamegroup/module/game/model/GameGroup.java
  22. 60 2
      app/src/main/java/com/sheep/gamegroup/module/game/model/SearchResp.java
  23. 5 1
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  24. 109 38
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  25. 3 0
      app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java
  26. 1 6
      app/src/main/java/com/sheep/gamegroup/view/activity/ActArticle.java
  27. 0 10
      app/src/main/java/com/sheep/gamegroup/view/activity/ActDownloadWelfareList.java
  28. 1 6
      app/src/main/java/com/sheep/gamegroup/view/activity/ActReservation.java
  29. 1 7
      app/src/main/java/com/sheep/gamegroup/view/activity/ActXiaomiGame.java
  30. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/MiddleAct.java
  31. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  32. 1 1
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGameCenter1_2List.java
  33. 1 6
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppList.java
  34. 1 6
      app/src/main/java/com/sheep/gamegroup/view/adapter/AdpUserAppHomeComment.java
  35. 10 18
      app/src/main/java/com/sheep/gamegroup/view/adapter/PlayGameItemAdapter.java
  36. 1 4
      app/src/main/java/com/sheep/gamegroup/view/adapter/PlayGameListAdapter.java
  37. 1 6
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtArticleComment.java
  38. 1 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtFootprint.java
  39. 1 6
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGameFocusList.java
  40. 6 9
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtUserCommentDetail.java
  41. 22 42
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareCenter.java
  42. 8 0
      app/src/main/res/drawable/shape_vip_gradient_rectangle_15.xml
  43. 254 0
      app/src/main/res/layout/act_game_group_or_game_detail.xml
  44. 3 3
      app/src/main/res/layout/fgt_gc_game_app_detail.xml
  45. 1 1
      app/src/main/res/layout/item_game_center_type_list.xml
  46. 105 0
      app/src/main/res/layout/item_game_group_game_compare.xml

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

@@ -955,6 +955,10 @@
             android:name="com.sheep.gamegroup.module.game.activity.ActSearchGameGroup"
             android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail"
+            android:theme="@style/AppActionTheme"
+            android:screenOrientation="portrait" />
     </application>
 
 </manifest>

+ 10 - 0
app/src/main/java/com/kfzs/duanduan/utils/NumberFormatUtils.java

@@ -151,6 +151,16 @@ public class NumberFormatUtils {
     }
 
     /**
+     * 保留1位小数
+     *
+     * @param bonus
+     * @return
+     */
+    public static String retain1(float bonus) {
+        DecimalFormat df = new DecimalFormat("0.0");
+        return df.format(bonus);
+    }
+    /**
      * 保留两位小数
      *
      * @param bonus

+ 3 - 7
app/src/main/java/com/sheep/gamegroup/helper/ImageListHelper.java

@@ -7,6 +7,7 @@ import android.view.View;
 import android.widget.ImageView;
 
 import com.bumptech.glide.Glide;
+import com.bumptech.glide.request.RequestOptions;
 import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
 import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
 import com.sheep.gamegroup.util.Jump2View;
@@ -29,16 +30,11 @@ public class ImageListHelper {
                 View view = viewHolder.getView(R.id.img_detail);
                 if (view instanceof ImageView) {
                     try {
-                        Glide.with(SheepApp.getInstance()).load(url).into((ImageView) view);
+                        Glide.with(SheepApp.getInstance()).load(url).apply(new RequestOptions().centerCrop()).into((ImageView) view);
                     } catch (Exception e) {
                         e.printStackTrace();
                     }
-                    view.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View v) {
-                            Jump2View.getInstance().showImgList(activity, position, pictureList);
-                        }
-                    });
+                    view.setOnClickListener(v -> Jump2View.getInstance().showImgList(activity, position, pictureList));
                 }
 
             }

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java

@@ -1693,7 +1693,7 @@ public interface ApiService {
      * 返回 GameGroup
      */
     @GET("app/game_group/{id}")
-    Observable<BaseMessage> getGameGroupById(@Query("id") int id);
+    Observable<BaseMessage> getGameGroupById(@Path("id") int id);
     /**
      * 获取出包类型列表
      * 返回 PackageTypes 列表

+ 31 - 1
app/src/main/java/com/sheep/gamegroup/model/entity/Applications.java

@@ -1,8 +1,11 @@
 package com.sheep.gamegroup.model.entity;
 
+import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.sheep.gamegroup.helper.DownloadHelper;
 import com.sheep.gamegroup.helper.FindAppHelper;
 import com.sheep.gamegroup.model.api.IDownload;
+import com.sheep.gamegroup.module.game.api.IGameGroup;
+import com.sheep.gamegroup.util.string.SpannableSb;
 
 import java.io.Serializable;
 import java.util.List;
@@ -11,7 +14,7 @@ import java.util.List;
  * Created by realicing on 2018/6/28.
  * realicing@sina.com
  */
-public class Applications implements IDownload, Serializable {
+public class Applications implements IDownload, IGameGroup, Serializable {
     private int updated_at;
 
     private float score;//评分
@@ -81,6 +84,8 @@ public class Applications implements IDownload, Serializable {
     private int comment_num;
 
     private int game_discount_id = 0;
+    //游戏组类型
+    private String package_type_name;
 
     public int getGame_discount_id() {
         return game_discount_id;
@@ -370,6 +375,18 @@ public class Applications implements IDownload, Serializable {
         this.main_publicize = main_publicize;
     }
 
+    public void setPackage_type_name(String package_type_name) {
+        this.package_type_name = package_type_name;
+    }
+
+    public String getPackage_type_name() {
+        return package_type_name;
+    }
+
+
+
+
+
     @Override
     public String getPackage_names() {
         return package_name;
@@ -396,6 +413,13 @@ public class Applications implements IDownload, Serializable {
 
 
 
+    @Override
+    public String getPackageSizeMsg() {
+        return package_size + "M";
+    }
+
+
+
     /**
      * 是否可以下载
      *
@@ -439,4 +463,10 @@ public class Applications implements IDownload, Serializable {
         findAppHelper.getDownloadHelper().updateState(status);
     }
 
+    public CharSequence getInfo() {
+        return new SpannableSb().append(package_size+"M\u3000", "#999999").append(NumberFormatUtils.retainMost2W(download_count), "#2EBEF2").append("人在玩", "#999999").getSsb();
+    }
+    public CharSequence getInfo1() {
+        return new SpannableSb().append(NumberFormatUtils.retainMost2W(download_count), "#2EBEF2").append("人在玩", "#999999").getSsb();
+    }
 }

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameCenterType.java

@@ -30,7 +30,7 @@ public class ActGameCenterType extends BaseContainerActivity {
                 .setShowOrHide(this, true)
                 .setTitle(this, gameCenterType.getName())
                 .setRightImgBotton(this, R.drawable.index_download, view -> Jump2View.getInstance().goActDownloadManager(this))
-                .setRightSecondBtn(this, R.drawable.search_black_img, view -> Jump2View.getInstance().goActpSearchGameGroup(this))
+                .setRightSecondBtn(this, R.drawable.search_black_img, view -> Jump2View.getInstance().goActSearchGameGroup(this))
                 .setTitleFinish(this);
     }
 

+ 476 - 0
app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameGroupOrGameDetail.java

@@ -0,0 +1,476 @@
+package com.sheep.gamegroup.module.game.activity;
+
+import android.content.Intent;
+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.AppCompatRatingBar;
+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.chad.library.adapter.base.BaseQuickAdapter;
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+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.AbsGetDownloadListener;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.absBase.ILoadMore;
+import com.sheep.gamegroup.absBase.IRefresh;
+import com.sheep.gamegroup.event.BigEvent;
+import com.sheep.gamegroup.helper.DownloadHelper;
+import com.sheep.gamegroup.model.entity.Applications;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.GameListTag;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.game.adapter.AdpGameGroupGameCompare;
+import com.sheep.gamegroup.module.game.fragment.FgtGameComment;
+import com.sheep.gamegroup.module.game.fragment.FgtGameDetail;
+import com.sheep.gamegroup.module.game.fragment.FgtGameWelfare;
+import com.sheep.gamegroup.module.game.model.GameGroup;
+import com.sheep.gamegroup.util.ApiUtil;
+import com.sheep.gamegroup.util.CommonUtil;
+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.RequestCodeConstants;
+import com.sheep.gamegroup.util.TagListUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter2;
+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 org.greenrobot.eventbus.EventBus;
+import org.greenrobot.eventbus.Subscribe;
+
+import java.util.List;
+import java.util.Locale;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_SHARE;
+
+
+/**
+ * Created by realicing on 2019/1/22.
+ * realicing@sina.com
+ * 小绵羊3.4.10新增 -- 游戏组或者游戏组游戏详情界面
+ */
+public class ActGameGroupOrGameDetail extends BaseActivity {
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        StatusBarUtils.setTranslucent(this);
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.act_game_group_or_game_detail;
+    }
+
+    @BindView(R.id.refresh)
+    SmartRefreshLayout refresh;
+    @BindView(R.id.tabLayout)
+    TabLayout tabLayout;
+    @BindView(R.id.viewPager)
+    ViewPager viewPager;
+    @BindView(R.id.gc_game_app_detail_iv)
+    ImageView gc_game_app_detail_iv;
+    @BindView(R.id.gc_game_app_detail_iv2)
+    ImageView gc_game_app_detail_iv2;
+    @BindView(R.id.gc_game_app_detail_play_iv)
+    ImageView gc_game_app_detail_play_iv;
+    @BindView(R.id.gc_game_app_detail_icon)
+    ImageView gc_game_app_detail_icon;
+    @BindView(R.id.write_comment)
+    ImageView write_comment;
+    @BindView(R.id.gc_game_app_comment_score)
+    AppCompatRatingBar gc_game_app_comment_score;
+    @BindView(R.id.gc_game_app_detail_score_tv)
+    TextView gc_game_app_detail_score_tv;
+    @BindView(R.id.gc_game_app_detail_info_tv)
+    TextView gc_game_app_detail_info_tv;
+    @BindView(R.id.gc_game_app_detail_bt1)
+    TextView gc_game_app_detail_bt1;
+    @BindView(R.id.gc_game_app_detail_name)
+    TextView gc_game_app_detail_name;
+    @BindView(R.id.gc_game_app_detail_bt2)
+    TextView gc_game_app_detail_bt2;
+    @BindView(R.id.gc_game_app_detail_bt3)
+    TextView gc_game_app_detail_bt3;
+    @BindView(R.id.gc_game_app_detail_tag_list)
+    RecyclerView recyclerView;
+    //游戏组界面:比一比
+    @BindView(R.id.gc_game_app_detail_game_list)
+    View gc_game_app_detail_game_list;
+    @BindView(R.id.item_gc_game_app_list_bottom)
+    View item_gc_game_app_list_bottom;
+    @BindView(R.id.item_gc_game_app_list_rv)
+    RecyclerView item_gc_game_app_list_rv;
+    @BindView(R.id.item_gc_game_app_list_top)
+    View item_gc_game_app_list_top;
+    @BindView(R.id.item_gc_game_app_list_tv)
+    TextView item_gc_game_app_list_tv;
+
+    private TitleFragmentListAdapter2 mAdapter;
+    private FgtGameDetail fgtGameDetail;
+    private FgtGameComment fgtGameComment;
+
+    private int id;
+    private GameGroup gameGroup;
+
+    @Override
+    public void initView() {
+        Intent intent = getIntent();
+        id = intent.getIntExtra("id", 0);
+        gameGroup = DataUtil.getObject(intent, GameGroup.class);
+        EventBus.getDefault().register(this);
+        //tagList
+        TagListUtil.setTagList(recyclerView, tagList);
+        //viewPager
+        mAdapter = new TitleFragmentListAdapter2(getSupportFragmentManager());
+        fgtGameDetail = FgtGameDetail.newInstance(id);
+        fgtGameComment = FgtGameComment.newInstance(id);
+        fgtGameDetail.setSmartRefreshLayout(refresh);
+        fgtGameComment.setSmartRefreshLayout(refresh);
+        fgtGameComment.setListAction1(fgtGameDetail);
+        mAdapter.add(fgtGameDetail, "详情");
+        mAdapter.add(fgtGameComment, "评价");
+        viewPager.setOffscreenPageLimit(mAdapter.getCount());
+        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);
+
+        ViewUtil.setImage(write_comment, ViewUtil.getNetImgByName("write_comment"));
+        if(gameGroup == null){
+            ViewUtil.setVisibility(gc_game_app_detail_game_list, false);
+        } else {
+            ViewUtil.setVisibility(gc_game_app_detail_game_list, true);
+            ViewUtil.setVisibility(item_gc_game_app_list_bottom, true);
+            ViewUtil.setVisibility(item_gc_game_app_list_top, false);
+            ViewUtil.setText(item_gc_game_app_list_tv, "比一比");
+            ViewUtil.setText(gc_game_app_detail_bt2, "推荐下载");
+            item_gc_game_app_list_rv.setHasFixedSize(true);
+            item_gc_game_app_list_rv.setNestedScrollingEnabled(false);
+            item_gc_game_app_list_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+            BaseQuickAdapter baseQuickAdapter = new AdpGameGroupGameCompare(gameGroup.getApplications());
+            baseQuickAdapter.bindToRecyclerView(item_gc_game_app_list_rv);
+            baseQuickAdapter.setOnItemClickListener((adapter, view, position) -> {
+                Applications item = ListUtil.getItem(gameGroup.getApplications(), position);
+                if(item != null){
+                    Jump2View.getInstance().goFindGame(item);
+                }
+            });
+        }
+    }
+
+    private List<GameListTag> tagList = ListUtil.emptyList();
+
+    //重置view
+    private void resetView() {
+        ViewUtil.setDefaultText(gc_game_app_detail_name);
+        ViewUtil.setDefaultText(gc_game_app_detail_score_tv);
+        ViewUtil.setDefaultText(gc_game_app_detail_info_tv);
+    }
+
+    //检查数据
+    private void checkData(GameEntity gameEntity) {
+        if (gameEntity != null && gameEntity.getApp() != null) {
+            loadData(gameEntity);
+        } else {
+            resetView();
+        }
+    }
+
+    private GameEntity gameEntity;
+
+    //更新关注状态
+    private void updateFocusTv() {
+        if (gc_game_app_detail_bt1 != null && gameEntity != null)
+            gc_game_app_detail_bt1.setText(gameEntity.isIs_focus_game() ? R.string.has_focus : R.string.focus);
+    }
+
+    //加载游戏数据
+    private void loadData(final GameEntity gameEntity) {
+        this.gameEntity = gameEntity;
+        //更新关注状态
+        updateFocusTv();
+        tryInitWelfare();
+        //更新评价数量
+        if (gameEntity.getApp().getComment_num() > 0) {
+            TabLayout.Tab tab = tabLayout.getTabAt(1);
+            if (tab != null)
+                tab.setText(String.format(Locale.CHINA, "评价(%d)", gameEntity.getApp().getComment_num()));
+            CommonUtil.getInstance().reflex(tabLayout, this, true);
+        }
+        //加载游戏背景
+        if (TextUtils.isEmpty(gameEntity.getApp().getMain_publicize())) {
+            ViewUtil.setImage(gc_game_app_detail_iv, gameEntity.getApp().getPictures());
+            ViewUtil.setVisibility(gc_game_app_detail_iv, true);
+            ViewUtil.setVisibility(gc_game_app_detail_iv2, false);
+        } else {
+            ViewUtil.setImage(gc_game_app_detail_iv2, gameEntity.getApp().getMain_publicize());
+            ViewUtil.setVisibility(gc_game_app_detail_iv, false);
+            ViewUtil.setVisibility(gc_game_app_detail_iv2, true);
+            if (gameEntity.getApp().getMain_publicize().endsWith(".mp4")) {
+                gc_game_app_detail_play_iv.setVisibility(View.VISIBLE);
+                gc_game_app_detail_play_iv.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        Jump2View.getInstance().goActPlayVideo(gameEntity.getApp().getMain_publicize(), true);
+                    }
+                });
+            }
+        }
+        //加载游戏图标
+        ViewUtil.setGameImage(gc_game_app_detail_icon, gameEntity.getApp().getIcon());
+        //加载游戏名字
+        ViewUtil.setText(gc_game_app_detail_name, gameEntity.getApp().getName());
+        //加载游戏大小与多少人在玩信息
+        ViewUtil.setText(gc_game_app_detail_info_tv, gameEntity.getApp().getInfo());
+        //加载游戏标签
+        if (gameEntity.getApp().getTags() != null) {
+            tagList.clear();
+            tagList.addAll(gameEntity.getApp().getTags());
+            ListUtil.removeNull(tagList);
+            if (recyclerView.getAdapter() != null)
+                recyclerView.getAdapter().notifyDataSetChanged();
+        }
+        //下载按钮
+        CommonUtil.getInstance().palyGameDetailBtnValue(this, gameEntity, gc_game_app_detail_bt2, 0);
+        fgtGameDetail.loadData(gameEntity);
+        if (gameEntity.getApp().getGame_discount_id() == 0) {
+            gc_game_app_detail_bt3.setVisibility(View.GONE);
+        } else {
+            gc_game_app_detail_bt3.setVisibility(View.VISIBLE);
+        }
+    }
+    //更新评分
+    public void updateScore(float score) {
+        int progress = (int) score;
+        if (gc_game_app_comment_score != null) {
+            gc_game_app_comment_score.setMax(10);
+            gc_game_app_comment_score.setProgress(progress);
+        }
+        //加载游戏评分
+        ViewUtil.setText(gc_game_app_detail_score_tv, NumberFormatUtils.retain1(score) + "分");
+    }
+
+    private FgtGameWelfare fgtGameWelfare;
+
+    //重新初始化viewPager的数据
+    private void tryInitWelfare() {
+        if (fgtGameWelfare != null || !gameEntity.isGift()) {
+            return;
+        }
+        fgtGameWelfare = FgtGameWelfare.newInstance(id);
+        fgtGameWelfare.setSmartRefreshLayout(refresh);
+        fgtGameWelfare.loadData(gameEntity);
+        mAdapter.add(fgtGameWelfare, "礼包");
+        mAdapter.notifyDataSetChanged();
+        viewPager.setOffscreenPageLimit(mAdapter.getCount());
+    }
+
+    //通过网络获取游戏数据并尝试加载
+    private void initDetailFromNet() {
+        SheepApp.getInstance().getNetComponent().getApiService().playGameDetail(id)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(this) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.playGameDetail(id));
+                        if (isNewData) {
+                            GameEntity gameEntity = baseMessage.getData(GameEntity.class);
+                            checkData(gameEntity);
+                        } else if (gameEntity != null) {
+                            //更新下载按钮
+                            CommonUtil.getInstance().palyGameDetailBtnValue(ActGameGroupOrGameDetail.this, gameEntity, gc_game_app_detail_bt2, 0);
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                        resetView();
+                    }
+                });
+    }
+
+    @Override
+    public void initData() {
+        GameEntity gameEntity = DataUtil.getInstance().getCacheResult(ApiKey.playGameDetail(id), GameEntity.class);
+        checkData(gameEntity);
+        refreshData();
+    }
+
+    private int refreshDataCount = 0;
+
+    //刷新数据
+    public void refreshData() {
+        refreshData(viewPager.getCurrentItem());
+    }
+
+    //刷新数据
+    public void refreshData(int position) {
+        initDetailFromNet();
+        boolean isRefresh = false;
+        if (refreshDataCount != 0) {
+            Fragment item = mAdapter.getItem(position);
+            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) {
+        FIND_SHARE.onEvent("application_id", id);
+        if (gameEntity == null || gameEntity.getApp() == null || TextUtils.isEmpty(gameEntity.getApp().getName())) {
+            Jump2View.getInstance().tryShare(this, "find_share_url", "application_id", id);
+            return;
+        }
+        Jump2View.getInstance().tryShare(this, "find_share_url", "application_id", id, String.format(Locale.CHINA, "【%s】超好玩,来小绵羊一起玩", gameEntity.getApp().getName()));
+    }
+
+    //点击加,发表评论
+    public void onClickPlusDrag(View view) {
+        Jump2View.getInstance().goActCommentGameApp(this, id);
+    }
+
+    //点击关注
+    public void onClickFollowTv(final View view) {
+        if (gameEntity == null) {
+            G.showToast(R.string.loading_data);
+            return;
+        }
+        view.setEnabled(false);
+        ApiUtil.postGameUserFocusGame(id, new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+            @Override
+            public void onNext(BaseMessage baseMessage) {
+                G.showToast(gameEntity.isIs_focus_game() ? R.string.cancel_focus_success : R.string.focus_success);
+                gameEntity.setIs_focus_game(!gameEntity.isIs_focus_game());
+                updateFocusTv();
+                view.setEnabled(true);
+            }
+
+            @Override
+            public void onError(BaseMessage baseMessage) {
+                G.showToast(gameEntity.isIs_focus_game() ? R.string.cancel_focus_fail : R.string.focus_fail);
+                view.setEnabled(true);
+            }
+        });
+    }
+
+    @OnClick(R.id.gc_game_app_detail_bt3)
+    public void onGoDirectionalPay(View v) {
+        Jump2View.getInstance().gotoGameVipRecharge(gameEntity.getApp());
+    }
+
+    private AbsGetDownloadListener absGetDownloadListener = new AbsGetDownloadListener(true) {
+        @Override
+        public String getDownloadUrl(String packageName) {
+            return gameEntity != null ? gameEntity.getDownloadUrl(packageName) : null;
+        }
+
+        @Override
+        public TextView getTextView2(String packageName) {
+            return getDownloadUrl(packageName) != null ? gc_game_app_detail_bt2 : null;
+        }
+
+        @Override
+        public TextView getTextView(String downloadUrl) {
+            return gameEntity != null && TextUtils.equals(downloadUrl, gameEntity.downLinks()) ? gc_game_app_detail_bt2 : null;
+        }
+
+        @Override
+        public DownloadHelper getDownloadHelper(String downloadUrl) {
+            return gameEntity != null ? gameEntity.getDownloadHelper(downloadUrl) : null;
+        }
+    };
+
+    @Subscribe
+    public void onEventMainThread(Intent intent) {
+        absGetDownloadListener.onEventMainThread(intent);
+    }
+
+    @Subscribe
+    public void onEventMainThread(BigEvent event) {
+        absGetDownloadListener.onEventMainThread(event);
+    }
+
+    @Override
+    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+        super.onActivityResult(requestCode, resultCode, data);
+        switch (requestCode) {
+            case RequestCodeConstants.REQUEST_CODE_REFRESH:
+                if (resultCode == RESULT_OK)//发表评论成功
+                    refreshData(1);//需要刷新第二页的评论
+                break;
+        }
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        EventBus.getDefault().unregister(this);
+    }
+
+}

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/module/game/activity/ActGameRank.java

@@ -26,7 +26,7 @@ public class ActGameRank extends BaseContainerActivity {
                 .setShowOrHide(this, true)
                 .setTitle(this, gameCenterType.getName())
                 .setRightImgBotton(this, R.drawable.index_download, view -> Jump2View.getInstance().goActDownloadManager(this))
-                .setRightSecondBtn(this, R.drawable.search_black_img, view -> Jump2View.getInstance().goActpSearchGameGroup(this))
+                .setRightSecondBtn(this, R.drawable.search_black_img, view -> Jump2View.getInstance().goActSearchGameGroup(this))
                 .setTitleFinish(this);
     }
 

+ 1 - 2
app/src/main/java/com/sheep/gamegroup/module/game/activity/ActSearchGameGroup.java

@@ -19,7 +19,6 @@ import com.sheep.gamegroup.greendao.download.SearchRecord;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GameEntity;
 import com.sheep.gamegroup.model.entity.TitleInfoList;
-import com.sheep.gamegroup.model.entity.TopSearchStatistics;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.game.fragment.FgtSearchGameGroup;
 import com.sheep.gamegroup.util.ApiUtil;
@@ -137,7 +136,7 @@ public class ActSearchGameGroup extends BaseContainerActivity {
                     public void onNext(BaseMessage baseMessage) {
                         boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.top_search_statistics);
                         if (isNewData) {
-                            List<TopSearchStatistics> newList = baseMessage.getDatas(TopSearchStatistics.class);
+                            List<GameEntity> newList = baseMessage.getDatas(GameEntity.class);
                             topSearchList.clear();
                             topSearchList.addAll(newList);
                             if (ListUtil.getItem(titleInfoListList, titleInfoList -> titleInfoList.getSort() == SORT_TOP_SEARCH) == null) {

+ 45 - 0
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpGameCenterTypeList2.java

@@ -0,0 +1,45 @@
+package com.sheep.gamegroup.module.game.adapter;
+
+import android.support.annotation.Nullable;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.module.game.model.GameGroup;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.util.string.SpannableSb;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2019/1/21.
+ * realicing@sina.com
+ */
+public class AdpGameCenterTypeList2 extends BaseQuickAdapter<GameGroup, BaseViewHolder> {
+    public AdpGameCenterTypeList2(@Nullable List<GameGroup> data) {
+        super(R.layout.item_game_center_type_list, data);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder helper, GameGroup item) {
+        ImageView item_dm_icon_iv = helper.getView(R.id.item_dm_icon_iv);
+        TextView item_dm_name_tv = helper.getView(R.id.item_dm_name_tv);
+        TextView item_dm_info_tv = helper.getView(R.id.item_dm_info_tv);
+
+        if(item == null){
+            ViewUtil.setDefaultText(item_dm_name_tv);
+            ViewUtil.setDefaultText(item_dm_info_tv);
+        } else {
+            ViewUtil.setImage(item_dm_icon_iv, item.getIcon());
+            ViewUtil.setText(item_dm_name_tv, item.getName());
+            String info = String.format(Locale.CHINA, "%sM\u3000", item.getPackage_size());
+            ViewUtil.setText(item_dm_info_tv, new SpannableSb().append(info, "#8E8E8E")
+//                    .append(item.getManufacturer(), "#FD2D54")
+                    .getSsb());
+
+        }
+    }
+}

+ 45 - 0
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpGameGroupGameCompare.java

@@ -0,0 +1,45 @@
+package com.sheep.gamegroup.module.game.adapter;
+
+import android.support.annotation.Nullable;
+import android.support.v7.widget.AppCompatRatingBar;
+import android.view.View;
+import android.widget.TextView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+import com.sheep.gamegroup.model.entity.Applications;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2019/1/22.
+ * realicing@sina.com
+ * 小绵羊3.4.10新增 -- 游戏组详情中游戏比一比
+ */
+public class AdpGameGroupGameCompare extends BaseQuickAdapter<Applications, BaseViewHolder> {
+    public AdpGameGroupGameCompare(@Nullable List<Applications> data) {
+        super(R.layout.item_game_group_game_compare, data);
+    }
+
+    @Override
+    protected void convert(BaseViewHolder helper, Applications item) {
+        TextView item_gggc_vip_tv = helper.itemView.findViewById(R.id.item_gggc_vip_tv);
+        TextView item_gggc_name_tv = helper.itemView.findViewById(R.id.item_gggc_name_tv);
+        TextView item_gggc_info_tv = helper.itemView.findViewById(R.id.item_gggc_info_tv);
+        TextView item_gggc_score_tv = helper.itemView.findViewById(R.id.item_gggc_score_tv);
+        AppCompatRatingBar item_gggc_score_acrb = helper.itemView.findViewById(R.id.item_gggc_score_acrb);
+        View item_gggc_line = helper.itemView.findViewById(R.id.item_gggc_line);
+
+        item_gggc_vip_tv.setOnClickListener(view -> Jump2View.getInstance().gotoGameVipRecharge(item));
+        ViewUtil.setText(item_gggc_name_tv, item.getPackage_type_name());
+        ViewUtil.setText(item_gggc_info_tv, item.getInfo1());
+        ViewUtil.setText(item_gggc_score_tv, NumberFormatUtils.retain1(item.getScore())+"分");
+        item_gggc_score_acrb.setMax(10);
+        item_gggc_score_acrb.setProgress((int) item.getScore());
+        ViewUtil.setVisibility(item_gggc_line, helper.getAdapterPosition() != 0);
+    }
+}

+ 10 - 20
app/src/main/java/com/sheep/gamegroup/module/game/adapter/AdpSearchResp.java

@@ -1,28 +1,20 @@
 package com.sheep.gamegroup.module.game.adapter;
 
-import android.app.Activity;
 import android.content.Context;
 import android.view.View;
-import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-import com.sheep.gamegroup.greendao.download.DownLoadInfo;
-import com.sheep.gamegroup.model.api.IDownload;
 import com.sheep.gamegroup.model.entity.Applications;
-import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.module.game.api.IGameGroup;
 import com.sheep.gamegroup.module.game.model.SearchResp;
 import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.util.DownloadUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.AdbCommonRecycler;
 import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.util.List;
 /**
@@ -42,27 +34,25 @@ public class AdpSearchResp extends AdbCommonRecycler<SearchResp>{
 
     @Override
     public void convert(ViewHolder holder, final SearchResp item) {
-        Applications download = item.getDownload();
-        if(download == null)
-            return;
-        holder.itemView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-            }
-        });
+        holder.itemView.setOnClickListener(v -> Jump2View.getInstance().goSearchResp(item));
         View item_download_welfare_line = holder.itemView.findViewById(R.id.line_tv);
         TextView detail_task_tv_center = holder.itemView.findViewById(R.id.detail_task_tv_center);
         TextView item_name_tv = holder.itemView.findViewById(R.id.item_name_tv);
         TextView item_date_tv = holder.itemView.findViewById(R.id.item_date_tv);
         LinearLayout ll_game_tag = holder.itemView.findViewById(R.id.ll_game_tag);
 
-        ViewUtil.setText(item_name_tv, download.getTask_name());
-        ViewUtil.setText(item_date_tv, download.getPackage_size()+"M");
-        GlideImageLoader.setGameImage(holder.itemView.findViewById(R.id.item_icon_iv), download.getIcon());
+        IGameGroup gameGroup = item.getGameGroup();
+        if(gameGroup == null){
+            return;
+        }
+        ViewUtil.setText(item_name_tv, gameGroup.getName());
+        ViewUtil.setText(item_date_tv, gameGroup.getPackageSizeMsg());
+        GlideImageLoader.setGameImage(holder.itemView.findViewById(R.id.item_icon_iv), gameGroup.getIcon());
         ViewUtil.setText(detail_task_tv_center, "查看详情");
 
         ViewUtil.setVisibility(item_download_welfare_line, holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
 
+        Applications download = item.getDownload();
         //tag 标签绘制
         CommonUtil.getInstance().paintLineaLayout(download, ll_game_tag, 4,R.color.txt_bule, R.drawable.shape_blue_stroke_rectangle_no_lb);
 

+ 13 - 0
app/src/main/java/com/sheep/gamegroup/module/game/api/IGameGroup.java

@@ -0,0 +1,13 @@
+package com.sheep.gamegroup.module.game.api;
+
+/**
+ * Created by realicing on 2019/1/22.
+ * realicing@sina.com
+ */
+public interface IGameGroup {
+    String getName();
+
+    String getPackageSizeMsg();
+
+    String getIcon();
+}

+ 3 - 3
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameCenter.java

@@ -9,7 +9,7 @@ import android.widget.ImageButton;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
-import com.sheep.gamegroup.view.fragment.FgtWelfareCenter;
+import com.sheep.gamegroup.view.fragment.FgtDownloadWelfareList;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 
@@ -51,7 +51,7 @@ public class FgtGameCenter extends BaseFragment {
         backBtn.setVisibility((getActivity() instanceof ActMain) ? View.GONE : View.VISIBLE);
         mAdapter = new TitleFragmentListAdapter(getChildFragmentManager());
         mAdapter.add(new FgtPlayGame(), "玩转游戏");
-        mAdapter.add(new FgtWelfareCenter(), "礼包中心");
+        mAdapter.add(new FgtDownloadWelfareList(), "礼包中心");
         pager.setAdapter(mAdapter);
         indicator.setupWithViewPager(pager);
         pager.setOffscreenPageLimit(3);
@@ -100,7 +100,7 @@ public class FgtGameCenter extends BaseFragment {
 
     @OnClick(R.id.search_btn)
     public void doSearch(View v) {
-        Jump2View.getInstance().goActpSearchGameGroup(getActivity());
+        Jump2View.getInstance().goActSearchGameGroup(getActivity());
     }
 
     @OnClick(R.id.my_walfare_btn)

+ 14 - 88
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameCenterType.java

@@ -1,44 +1,34 @@
 package com.sheep.gamegroup.module.game.fragment;
 
-import android.content.Intent;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.TextView;
 
 import com.chad.library.adapter.base.BaseQuickAdapter;
 import com.chad.library.adapter.base.BaseViewHolder;
-import com.sheep.gamegroup.absBase.AbsGetDownloadListener;
 import com.sheep.gamegroup.absBase.IApiRefresh;
 import com.sheep.gamegroup.absBase.NetApiRefresh;
-import com.sheep.gamegroup.event.BigEvent;
-import com.sheep.gamegroup.helper.DownloadHelper;
 import com.sheep.gamegroup.model.api.ApiService;
-import com.sheep.gamegroup.model.api.IDownload;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.GameEntity;
-import com.sheep.gamegroup.module.game.adapter.AdpGameCenterTypeList;
-import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.module.game.adapter.AdpGameCenterTypeList2;
+import com.sheep.gamegroup.module.game.model.GameGroup;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.view.fragment.BaseListFragment6;
 
 import org.afinal.simplecache.ApiKey;
-import org.greenrobot.eventbus.Subscribe;
 
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 
 import io.reactivex.Observable;
 
-import static com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp.PUBLIC_TAG_PREFIX_TEXTVIEW_LIST;
-
 /**
  * Created by realicing on 2019/1/21.
  * realicing@sina.com
  * 小绵羊3.4.10新增 -- 绵羊新游、免费道具、绵羊推荐 界面
  */
-public class FgtGameCenterType extends BaseListFragment6<GameEntity> {
+public class FgtGameCenterType extends BaseListFragment6<GameGroup> {
 
 
     private int type;
@@ -60,10 +50,10 @@ public class FgtGameCenterType extends BaseListFragment6<GameEntity> {
         return rootView;
     }
 
-    private NetApiRefresh<GameEntity> apiRefresh;
+    private NetApiRefresh<GameGroup> apiRefresh;
     @Override
     protected void addApiRefresh(List<IApiRefresh> apiRefreshList) {
-        apiRefresh = new NetApiRefresh<GameEntity>(this) {
+        apiRefresh = new NetApiRefresh<GameGroup>(this) {
             @Override
             public String getKey(int page, int per_page) {
                 return ApiKey.pageKeyUrl(ApiKey.getGameGroup, page, per_page);
@@ -75,86 +65,22 @@ public class FgtGameCenterType extends BaseListFragment6<GameEntity> {
             }
 
             @Override
-            public Class<GameEntity> getTClass() {
-                return GameEntity.class;
+            public Class<GameGroup> getTClass() {
+                return GameGroup.class;
             }
 
-            @Override
-            protected void loadList(List<GameEntity> addList) {
-                if(addList != null) {
-                    for (GameEntity item : addList) {
-                        IDownload download = item.getDownload();
-                        if (download != null) {
-                            gameEntityMap.put(download.getDownload_link(), item);
-                            gameEntityMap.put(download.getPackage_names(), item);
-                        }
-                    }
-                }
-                super.loadList(addList);
-            }
         };
         apiRefreshList.add(apiRefresh);
     }
 
     @Override
-    protected BaseQuickAdapter<GameEntity, BaseViewHolder> getAdapter() {
-        return new AdpGameCenterTypeList(apiRefresh.getList());
-    }
-
-    @Override
-    public void clear() {
-        gameEntityMap.clear();
-        super.clear();
-    }
-
-
-
-    //更新下载进度
-    private Map<String, GameEntity> gameEntityMap = new HashMap<>();
-
-    private AbsGetDownloadListener absGetDownloadListener = new AbsGetDownloadListener(true) {
-        @Override
-        public String getDownloadUrl(String packageName) {
-            GameEntity item = gameEntityMap.get(packageName);
-            return item != null && item.getDownload() != null ? item.getDownload().getDownload_link() : null;
-        }
-
-        @Override
-        public TextView getTextView2(String packageName) {
-            return recyclerView.findViewWithTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + getDownloadUrl(packageName));
-        }
-
-        @Override
-        public TextView getTextView(String downloadUrl) {
-            return recyclerView.findViewWithTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + downloadUrl);
-        }
-
-        @Override
-        public DownloadHelper getDownloadHelper(String downloadUrl) {
-            GameEntity item = gameEntityMap.get(downloadUrl);
-            return item != null ? item.getDownloadHelper(downloadUrl) : null;
-        }
-    };
-
-    @Subscribe
-    public void onEventMainThread(Intent intent) {
-        absGetDownloadListener.onEventMainThread(intent);
-    }
-
-    @Subscribe
-    public void onEventMainThread(BigEvent event) {
-        absGetDownloadListener.onEventMainThread(event);
-    }
-
-    @Override
-    public void initView() {
-        super.initView();
-        ViewUtil.register(this);
+    protected BaseQuickAdapter<GameGroup, BaseViewHolder> getAdapter() {
+        return new AdpGameCenterTypeList2(apiRefresh.getList());
     }
 
     @Override
-    public void onDestroy() {
-        super.onDestroy();
-        ViewUtil.unregister(this);
+    public void initListener() {
+        super.initListener();
+        baseQuickAdapter.setOnItemClickListener((adapter, view, position) -> Jump2View.getInstance().goActGameGroupDetail(ListUtil.getItem(apiRefresh.getList(), position)));
     }
 }

+ 242 - 0
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameComment.java

@@ -0,0 +1,242 @@
+package com.sheep.gamegroup.module.game.fragment;
+
+import android.app.Activity;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ProgressBar;
+import android.widget.RatingBar;
+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.api.ApiService;
+import com.sheep.gamegroup.model.entity.AppScoreDetail;
+import com.sheep.gamegroup.model.entity.Applications;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.GameAppScore;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.UserComment;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail;
+import com.sheep.gamegroup.util.ApiJSONUtil;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppComment;
+import com.sheep.gamegroup.view.fragment.BaseListFragment3;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.text.DecimalFormat;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Locale;
+
+import cn.modificator.waterwave_progress.WaterWaveProgress;
+import io.reactivex.Observable;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+import rx.functions.Action1;
+/**
+ * Created by realicing on 2019/1/22.
+ * realicing@sina.com
+ * 小绵羊3.4.10新增 -- 玩转游戏 评价
+ */
+public class FgtGameComment extends BaseListFragment3<UserComment> {
+
+
+    public static FgtGameComment newInstance(int appId) {
+        FgtGameComment fgt = new FgtGameComment();
+        fgt.app_id = appId;
+        return fgt;
+    }
+
+    private int app_id;
+    private int type = ApiJSONUtil.COMMENT_TYPE_GAME;
+
+    private List<GameAppScore> scoreList = ListUtil.emptyList();
+    //头部view
+    private View headerView;
+    private TextView comment_title_tv;
+    private WaterWaveProgress circularProgressView;
+    private RatingBar header_gc_game_app_comment_score;
+    private RecyclerView header_gc_game_app_comment_xin_list;
+
+    @Override
+    protected RecyclerView.Adapter getAdapter() {
+        //头部
+        headerView = LayoutInflater.from(SheepApp.getInstance()).inflate(R.layout.header_gc_game_app_comment, null);
+        comment_title_tv = headerView.findViewById(R.id.comment_title_tv);
+        circularProgressView = headerView.findViewById(R.id.header_gc_game_app_comment_score_progress);
+        header_gc_game_app_comment_score = headerView.findViewById(R.id.header_gc_game_app_comment_score);
+
+        //评分列表
+        resetGameAppScoreNum();
+        header_gc_game_app_comment_xin_list = headerView.findViewById(R.id.header_gc_game_app_comment_xin_list);
+        header_gc_game_app_comment_xin_list.setHasFixedSize(true);
+        header_gc_game_app_comment_xin_list.setNestedScrollingEnabled(false);
+        header_gc_game_app_comment_xin_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        header_gc_game_app_comment_xin_list.setAdapter(new RecyclerViewAdapter<GameAppScore>(SheepApp.getInstance(), R.layout.item_xin_progress, scoreList) {
+            @Override
+            public void convert(ViewHolder viewHolder, GameAppScore item, int position) {
+                TextView item_xin_progress_tv = viewHolder.itemView.findViewById(R.id.item_xin_progress_tv);
+                ProgressBar item_xin_progress = viewHolder.itemView.findViewById(R.id.item_xin_progress);
+                ViewUtil.setText(item_xin_progress_tv, item.getStar());
+                item_xin_progress.setProgress(item.getNum());
+                item_xin_progress.setMax(item.getMax());
+            }
+        });
+
+        //评论列表
+        AdpGcGameAppComment adapter = new AdpGcGameAppComment(list);
+        adapter.addHeaderView(headerView);
+        return adapter;
+    }
+
+    @Override
+    protected String getKey(int page, int per_page) {
+        return String.format(Locale.CHINA, "app/game_user/app_comment_list?page_no=%d&page_size=%d&app_id=%d&comment_type=%d", page, per_page, app_id, type);
+    }
+
+    @Override
+    protected Observable<BaseMessage> getApi(ApiService apiService) {
+        return apiService.getGameUserAppCommentList(page, per_page, app_id, type);
+    }
+
+    private Action1<List<UserComment>> listAction1;
+
+    public void setListAction1(Action1<List<UserComment>> listAction1) {
+        this.listAction1 = listAction1;
+    }
+
+    @Override
+    protected void loadList(List<UserComment> addList) {
+        super.loadList(addList);
+        if(listAction1 != null && page == 1 && !ListUtil.isEmpty(addList))
+            listAction1.call(addList);
+    }
+
+    @Override
+    protected Class<UserComment> getTClass() {
+        return UserComment.class;
+    }
+    @Override
+    public void notifyDataSetChanged() {
+        super.notifyDataSetChanged();
+        int totalCount = list.size();
+        if(lastMessage != null && lastMessage.getTotal() > totalCount)
+            totalCount = lastMessage.getTotal();
+        if(totalCount == 0){
+            ViewUtil.setVisibility(comment_title_tv, false);
+        } else {
+            ViewUtil.setVisibility(comment_title_tv, true);
+            ViewUtil.setText(comment_title_tv, String.format(Locale.CHINA, "用户评价(%d)", totalCount));
+        }
+    }
+
+    //不会用到了,因为评分系统重新做了一套,以前的没用了
+    public void loadData(GameEntity gameEntity) {
+        Applications gameApp;
+        if ((gameApp = gameEntity.getApp()) != null) {
+            updateScore(gameApp.getScore());
+        }
+    }
+
+    //更新评分
+    public void updateScore(float score) {
+        int progress = (int) score;
+        //显示评分
+        if (circularProgressView != null) {
+            circularProgressView.setMaxProgress(10);
+            circularProgressView.setProgress(progress);
+            circularProgressView.setText(new DecimalFormat("0.0").format(score));
+        }
+        if (header_gc_game_app_comment_score != null) {
+            header_gc_game_app_comment_score.setMax(10);
+            header_gc_game_app_comment_score.setProgress(progress);
+        }
+        Activity activity = getActivity();
+        if(activity instanceof ActGameGroupOrGameDetail){
+            ((ActGameGroupOrGameDetail) activity).updateScore(score);
+        }
+    }
+
+    @Override
+    public void refreshData() {
+        initAppScoreNum();
+        super.refreshData();
+    }
+
+    //评分排序方法
+    private Comparator<GameAppScore> scoreComparable = new Comparator<GameAppScore>() {
+        @Override
+        public int compare(GameAppScore item1, GameAppScore item2) {
+            return item2.getStar() - item1.getStar();
+        }
+    };
+
+    //加载评分列表
+    private void initAppScoreNum() {
+        scoreList.clear();
+        notifyHeaderDataSetChanged();
+        SheepApp.getInstance().getNetComponent().getApiService().getGameUserAppScoreDetail(app_id)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        scoreList.clear();
+                        AppScoreDetail appScoreDetail = baseMessage.getData(AppScoreDetail.class);
+                        if (appScoreDetail != null) {
+                            updateScore(appScoreDetail.getScore());
+                            List<GameAppScore> newScoreList = appScoreDetail.toGameAppScoreList();
+                            if (ListUtil.isEmpty(newScoreList))
+                                resetGameAppScoreNum();
+                            else {
+                                scoreList.addAll(newScoreList);
+                                Collections.sort(scoreList, scoreComparable);
+                            }
+                        }
+                        notifyHeaderDataSetChanged();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        resetGameAppScoreNum();
+                        notifyHeaderDataSetChanged();
+                        updateScore(10);//默认10分
+                    }
+                });
+    }
+
+    //刷新头部view
+    private void notifyHeaderDataSetChanged() {
+        ViewUtil.notifyDataSetChanged(header_gc_game_app_comment_xin_list);
+
+        if (empty_view != null) {
+            empty_view.postDelayed(new Runnable() {
+                @Override
+                public void run() {
+                    if (headerView != null) {
+                        int height = headerView.getHeight();
+                        CommonUtil.getInstance().setEmptyViewMargin(empty_view, (int) (height * 0.9), (int) (height * 0.3));
+                    }
+                }
+            }, 100L);
+        }
+    }
+
+    //重置评分列表
+    private void resetGameAppScoreNum() {
+        for (int i = 0; i < 5; i++) {//5星满分
+            GameAppScore item = new GameAppScore();
+            item.setNum(0);
+            item.setStar(5 - i);
+            scoreList.add(item);
+        }
+    }
+
+}

+ 237 - 0
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameDetail.java

@@ -0,0 +1,237 @@
+package com.sheep.gamegroup.module.game.fragment;
+
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.kfzs.appstore.utils.adapter.recyclerview.RecyclerViewAdapter;
+import com.kfzs.appstore.utils.adapter.recyclerview.ViewHolder;
+import com.sheep.gamegroup.absBase.AbsObserver;
+import com.sheep.gamegroup.absBase.BaseRefreshLoadMoreFragment;
+import com.sheep.gamegroup.helper.ImageListHelper;
+import com.sheep.gamegroup.model.entity.AppInfoExtDetail;
+import com.sheep.gamegroup.model.entity.Applications;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.Entry;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.GameInfoList;
+import com.sheep.gamegroup.model.entity.ShowAll;
+import com.sheep.gamegroup.model.entity.UserComment;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.TestUtil;
+import com.sheep.gamegroup.util.TextViewUtil;
+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.utils.G;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import butterknife.BindView;
+import io.reactivex.Observable;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+import rx.functions.Action1;
+
+/**
+ * Created by realicing on 2019/1/22.
+ * realicing@sina.com
+ * 小绵羊3.4.10新增 -- 玩转游戏 详情
+ */
+public class FgtGameDetail extends BaseRefreshLoadMoreFragment implements Action1<List<UserComment>> {
+    @BindView(R.id.gc_game_app_detail_pic_list)
+    RecyclerView gc_game_app_detail_pic_list;
+    @BindView(R.id.gc_game_app_detail_info_list)
+    RecyclerView recyclerView;
+
+    public static FgtGameDetail newInstance(int appId) {
+        FgtGameDetail fgt = new FgtGameDetail();
+        fgt.appId = appId;
+        return fgt;
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_gc_game_app_detail;
+    }
+
+
+    private ArrayList<String> pictureList = ListUtil.emptyList();
+    private ArrayList<GameInfoList> gameInfoListArrayList = ListUtil.emptyList();
+
+    @Override
+    public void onViewCreated() {
+        ImageListHelper.initList(getActivity(), gc_game_app_detail_pic_list, pictureList);
+        recyclerView.setHasFixedSize(true);
+        recyclerView.setNestedScrollingEnabled(false);
+        recyclerView.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        recyclerView.setAdapter(new AdpGcGameAppInfoList(gameInfoListArrayList));
+        refreshData();
+    }
+
+    //ActGcGameAppDetail调用该方法传入对应的游戏数据
+    public void loadData(final GameEntity gameEntity) {
+        if (gc_game_app_detail_pic_list == null) {
+            Observable.just(1).delay(100L, TimeUnit.MILLISECONDS)
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new AbsObserver<Integer>() {
+                        @Override
+                        public void onNext(Integer integer) {
+                            loadData(gameEntity);
+                        }
+                    });
+            return;
+        }
+        Applications gameApp;
+        if (gameEntity == null || (gameApp = gameEntity.getApp()) == null)
+            return;
+        ListUtil.removeItem(gameInfoListArrayList, gameInfoList -> SORT_GAME_INTRO == gameInfoList.getSort() || SORT_GAME_INFO == gameInfoList.getSort());
+        //游戏图片banner
+        String pictures = gameApp.getPictures();
+        if (!TextUtils.isEmpty(pictures)) {
+            pictureList.clear();
+            ListUtil.addAll(pictureList, pictures.split(";"));
+            ListUtil.removeNull(pictureList);
+            ViewUtil.setVisibility(gc_game_app_detail_pic_list, true);
+            ViewUtil.notifyDataSetChanged(gc_game_app_detail_pic_list);
+        } else {
+            ViewUtil.setVisibility(gc_game_app_detail_pic_list, false);
+        }
+        String intro = gameApp.getIntro();
+        if (!TextUtils.isEmpty(intro)) {
+            gameInfoListArrayList.add(new GameInfoList("游戏介绍", new RecyclerViewAdapter<ShowAll>(SheepApp.getInstance(), R.layout.item_gc_game_app_intro, ListUtil.asList(new ShowAll(intro))) {
+                @Override
+                public void convert(ViewHolder viewHolder, ShowAll showAll, int position) {
+                    TextViewUtil.initIntroView(viewHolder.itemView, showAll);
+                }
+            }).setSort(SORT_GAME_INTRO));
+        }
+        final List<Entry<String, String>> entryList = ListUtil.emptyList();
+        entryList.add(new Entry<>("当前版本", gameApp.getVersions()));
+        entryList.add(new Entry<>("大小", gameApp.getPackage_size()));
+        entryList.add(new Entry<>("更新日期", TimeUtil.TimeStamp2Date(gameApp.getUpdated_at(), "yyyy-MM-dd")));
+        entryList.add(new Entry<>("发行商", gameApp.getManufacturer()));
+
+        if (gameApp.getExt_detail() != null) {
+            try {
+                List<AppInfoExtDetail> list = JSONObject.parseArray(gameApp.getExt_detail(), AppInfoExtDetail.class);
+                if (!ListUtil.isEmpty(list)) {
+                    for (AppInfoExtDetail item : list) {
+                        try {
+                            entryList.add(new Entry<>(item.getTitle(), item.getValue()));
+                        } catch (Exception e) {
+                            e.printStackTrace();
+                            if (TestUtil.isDev())
+                                G.showToast(e.getMessage());
+                        }
+                    }
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+                if (TestUtil.isDev())
+                    G.showToast(e.getMessage());
+            }
+        }
+        gameInfoListArrayList.add(new GameInfoList("详细信息", new RecyclerViewAdapter<Entry<String, String>>(SheepApp.getInstance(), R.layout.item_gc_game_info, entryList) {
+            @Override
+            public void convert(ViewHolder viewHolder, Entry<String, String> item, int position) {
+                View item_gc_game_info_top = viewHolder.itemView.findViewById(R.id.item_gc_game_info_top);
+                TextView item_gc_game_info_key = viewHolder.itemView.findViewById(R.id.item_gc_game_info_key);
+                TextView item_gc_game_info_value = viewHolder.itemView.findViewById(R.id.item_gc_game_info_value);
+                View item_gc_game_info_bottom = viewHolder.itemView.findViewById(R.id.item_gc_game_info_bottom);
+                ViewUtil.setVisibility(item_gc_game_info_top, position == 0);
+                ViewUtil.setVisibility(item_gc_game_info_bottom, position + 1 == entryList.size());
+                ViewUtil.setText(item_gc_game_info_key, item.getK());
+                ViewUtil.setText(item_gc_game_info_value, item.getV());
+            }
+        }).setSort(SORT_GAME_INFO));
+        Collections.sort(gameInfoListArrayList);
+        ViewUtil.notifyDataSetChanged(recyclerView);
+    }
+
+    //加载相关游戏与热门试玩数据列表
+    private void initData(final int sort, final String name, Observable<BaseMessage> observable) {
+        observable.subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        ArrayList<Applications> newList = baseMessage.getDataList(Applications.class);
+                        if (!ListUtil.isEmpty(newList)) {
+                            gameInfoListArrayList.add(new GameInfoList(name, new AdpGcGameAppList(SheepApp.getInstance(), R.layout.item_gc_game_app_63, newList)).setHorizontal().setSort(sort));
+                            Collections.sort(gameInfoListArrayList);
+                            ViewUtil.notifyDataSetChanged(recyclerView);
+                        }
+                        refreshOrLoadMoreComplete();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        refreshOrLoadMoreComplete();
+                    }
+                });
+    }
+
+    private int appId;
+
+
+    @Override
+    public void loadMoreData() {
+        setNoMore(true);
+        refreshOrLoadMoreComplete();
+    }
+
+    @Override
+    public void refreshData() {
+        ListUtil.removeItem(gameInfoListArrayList, gameInfoList -> gameInfoList.getSort() == SORT_GAME_RELEVANT || gameInfoList.getSort() == SORT_GAME_HOT);
+        initData(SORT_GAME_RELEVANT, "相关游戏", SheepApp.getInstance().getNetComponent().getApiService().getDetailRelevantGames(appId));
+        initData(SORT_GAME_HOT, "热门试玩", SheepApp.getInstance().getNetComponent().getApiService().getDetailHotGames(appId));
+    }
+
+    //评论列表数据
+    private List<UserComment> userCommentList = ListUtil.emptyList();
+    public static final int MAX_USER_COMMENT_NUM = 2;//最多显示评论的个数
+
+    @Override
+    public void call(List<UserComment> userComments) {
+        userCommentList.clear();
+        if (userComments != null) {
+            for (int i = 0; i < userComments.size(); i++) {
+                if (i < MAX_USER_COMMENT_NUM)
+                    userCommentList.add(userComments.get(i));
+                else
+                    break;
+            }
+        }
+
+        GameInfoList item = ListUtil.getItem(gameInfoListArrayList, gameInfoList -> gameInfoList.getSort() == SORT_USER_COMMENT);
+        if (item == null) {
+            gameInfoListArrayList.add(new GameInfoList("用户评价", new AdpGcGameAppComment(userCommentList)).setSort(SORT_USER_COMMENT));
+            Collections.sort(gameInfoListArrayList);
+        }
+        ViewUtil.notifyDataSetChanged(recyclerView);
+    }
+
+    //游戏介绍
+    public static final int SORT_GAME_INTRO = 1;
+    //详细信息
+    public static final int SORT_GAME_INFO = 2;
+    //用户评价
+    public static final int SORT_USER_COMMENT = 3;
+    //相关游戏
+    public static final int SORT_GAME_RELEVANT = 4;
+    //热门试玩
+    public static final int SORT_GAME_HOT = 5;
+}

+ 153 - 0
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameWelfare.java

@@ -0,0 +1,153 @@
+package com.sheep.gamegroup.module.game.fragment;
+
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+
+import com.sheep.gamegroup.absBase.BaseRefreshLoadMoreFragment;
+import com.sheep.gamegroup.model.entity.Article;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.GameEntity;
+import com.sheep.gamegroup.model.entity.GameInfoList;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.TestUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppActivityRecommend;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppArticleRecommend;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppGiftBag;
+import com.sheep.gamegroup.view.adapter.AdpGcGameAppInfoList;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+/**
+ * Created by realicing on 2019/1/22.
+ * realicing@sina.com
+ * 小绵羊3.4.10新增 -- 玩转游戏 礼包
+ */
+public class FgtGameWelfare extends BaseRefreshLoadMoreFragment {
+
+    @BindView(R.id.recyclerView)
+    RecyclerView recyclerView;
+
+    public static FgtGameWelfare newInstance(int appId) {
+        FgtGameWelfare fgt = new FgtGameWelfare();
+        fgt.appId = appId;
+        return fgt;
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.common_rv;
+    }
+
+
+    private ArrayList<GameInfoList> gameInfoListArrayList = ListUtil.emptyList();
+
+    @Override
+    public void onViewCreated() {
+        recyclerView.setHasFixedSize(true);
+        recyclerView.setNestedScrollingEnabled(false);
+        recyclerView.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        AdpGcGameAppInfoList adpGcGameAppInfoList = new AdpGcGameAppInfoList(gameInfoListArrayList);
+        adpGcGameAppInfoList.bindToRecyclerView(recyclerView);
+        adpGcGameAppInfoList.setEmptyView(R.layout.include_empty_view);
+
+        refreshData();
+        if(gameEntity != null){
+            loadGameData();
+        }
+    }
+
+    //加载游戏数据
+    private void loadGameData() {
+        if (gameEntity.isGift()) {
+            gameInfoListArrayList.add(new GameInfoList("礼包推荐", new AdpGcGameAppGiftBag(SheepApp.getInstance(), gameEntity.getHas_gift_bag(), gameEntity)).setSort(SORT_GIFT));
+        }
+        ViewUtil.notifyDataSetChanged(recyclerView);
+    }
+
+
+    private int appId;
+
+
+    private GameEntity gameEntity;
+    public void loadData(final GameEntity gameEntity) {
+        this.gameEntity = gameEntity;
+        if(recyclerView != null) {
+            loadGameData();
+        }
+    }
+
+    @Override
+    public void refreshData() {
+        ListUtil.removeItem(gameInfoListArrayList, new ListUtil.CallBack<GameInfoList, Boolean>() {
+            @Override
+            public Boolean call(GameInfoList gameInfoList) {
+                return gameInfoList.getSort() == SORT_ACTIVITY || gameInfoList.getSort() == SORT_ARTICLE;
+            }
+        });
+        ViewUtil.notifyDataSetChanged(recyclerView);
+        //文章推荐
+        SheepApp.getInstance().getNetComponent().getApiService().getDetailArticleRecommend(appId)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        List<Article> newList = baseMessage.getDatas(Article.class);
+                        if (!ListUtil.isEmpty(newList)) {
+                            gameInfoListArrayList.add(new GameInfoList("文章推荐", new AdpGcGameAppArticleRecommend(getContext(), newList)).setSort(SORT_ARTICLE));
+                            ViewUtil.notifyDataSetChanged(recyclerView);
+                        }
+                        refreshOrLoadMoreComplete();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        if (TestUtil.isDev()) G.showToast(baseMessage);
+                        refreshOrLoadMoreComplete();
+                    }
+                });
+        //活动推荐
+        SheepApp.getInstance().getNetComponent().getApiService().getDetailActivityRecommend(appId)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        List<Article> newList = baseMessage.getDatas(Article.class);
+                        if (!ListUtil.isEmpty(newList)) {
+                            gameInfoListArrayList.add(new GameInfoList("活动推荐", new AdpGcGameAppActivityRecommend(getContext(), newList)).setSort(SORT_ACTIVITY));
+                            ViewUtil.notifyDataSetChanged(recyclerView);
+                        }
+                        refreshOrLoadMoreComplete();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        if (TestUtil.isDev()) G.showToast(baseMessage);
+                        refreshOrLoadMoreComplete();
+                    }
+                });
+    }
+
+    @Override
+    public void loadMoreData() {
+        setNoMore(true);
+        refreshOrLoadMoreComplete();
+    }
+
+    //礼包推荐
+    public static final int SORT_GIFT = 1;
+    //文章推荐
+    public static final int SORT_ARTICLE = 2;
+    //活动推荐
+    public static final int SORT_ACTIVITY = 3;
+}

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtMyGameList.java

@@ -101,7 +101,7 @@ public class FgtMyGameList extends BaseListFragment6<MyGame> {
         baseQuickAdapter.setOnItemClickListener((adapter, view, position) -> {
             MyGame item = ListUtil.getItem(apiRefresh.getList(), position);
             if (item != null)
-                Jump2View.getInstance().goFindGame(getActivity(), item.getApplication());
+                Jump2View.getInstance().goFindGame(item.getApplication());
         });
         return baseQuickAdapter;
     }

+ 6 - 12
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtPlayGame.java

@@ -101,14 +101,14 @@ public class FgtPlayGame extends BaseFragment {
         banner.setLayoutParams(bannerLayoutParams);
 
         //绵羊新游、免费道具、绵羊推荐、排行榜
-        int i = 0;
+        int index = 0;
         for (String name : GAME_CENTER_TYPE_NAME) {
             GameCenterType item = new GameCenterType();
             item.setName(name);
-            item.setId(GAME_CENTER_TYPE_ID[i]);
-            item.setIconName(GAME_CENTER_TYPE_ICON_NAME[i]);
+            item.setId(GAME_CENTER_TYPE_ID[index]);
+            item.setIconName(GAME_CENTER_TYPE_ICON_NAME[index]);
             gameCenterList.add(item);
-            i++;
+            index++;
         }
         play_game_center_type_list.setHasFixedSize(true);
         play_game_center_type_list.setNestedScrollingEnabled(false);
@@ -120,15 +120,9 @@ public class FgtPlayGame extends BaseFragment {
         play_game_list_x_rv.setHasFixedSize(true);
         play_game_list_x_rv.setNestedScrollingEnabled(false);
         play_game_list_x_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
-        play_game_list_x_rv.setAdapter(new AdpGameCenter3_3List(getActivity(), gameEntityListx));
+        play_game_list_x_rv.setAdapter(new AdpGameCenter3_3List(getActivity(), gameEntityListx).setShowFirstTop(false));
 
-        refresh.setOnRefreshListener(new OnRefreshListener() {
-
-            @Override
-            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
-                refreshData();
-            }
-        });
+        refresh.setOnRefreshListener(refreshLayout -> refreshData());
         RefreshUtil.newInstance().publicParameter(refresh, getActivity());
         refresh.autoRefresh();
     }

+ 35 - 4
app/src/main/java/com/sheep/gamegroup/module/game/model/GameGroup.java

@@ -1,17 +1,30 @@
 package com.sheep.gamegroup.module.game.model;
 
 import com.sheep.gamegroup.model.entity.Applications;
+import com.sheep.gamegroup.module.game.api.IGameGroup;
+
+import java.util.List;
 
 /**
  * Created by realicing on 2019/1/18.
  * realicing@sina.com
  *
  * 游戏组
+ *
+ * main_publicize:	string  宣传图(固定尺寸大小)
+ * created_at:	string ($string) 创建时间
+ * Name:	string  游戏组名
+ * is_display:	integer ($int64) 是否开启 1:显示 2:不显示
+ * updated_at:	string ($string) 更新时间
+ * icon:	string  游戏组图标
+ * package_size:	number ($double) 包大小 单位(M)
+ * tag:	integer ($int64) 类型 0:无 1:绵羊新游 2:绵羊推荐 2:免费道具
+ * id:	integer ($int64) 主键ID
  */
-public class GameGroup {
+public class GameGroup implements IGameGroup {
     private String Name;
 
-    private Applications applications;
+    private List<Applications> applications;
 
     private String created_at;
 
@@ -33,15 +46,20 @@ public class GameGroup {
         return Name;
     }
 
+    @Override
+    public String getPackageSizeMsg() {
+        return package_size + "M";
+    }
+
     public void setName(String name) {
         Name = name;
     }
 
-    public Applications getApplications() {
+    public List<Applications> getApplications() {
         return applications;
     }
 
-    public void setApplications(Applications applications) {
+    public void setApplications(List<Applications> applications) {
         this.applications = applications;
     }
 
@@ -108,4 +126,17 @@ public class GameGroup {
     public void setUpdated_at(String updated_at) {
         this.updated_at = updated_at;
     }
+
+
+
+    /**
+     * 获取第一个游戏
+     * @return
+     */
+    public Applications getFirstApplications() {
+        Applications app;
+        if(applications != null && (app = applications.get(0)) != null)
+            return app;
+        return null;
+    }
 }

+ 60 - 2
app/src/main/java/com/sheep/gamegroup/module/game/model/SearchResp.java

@@ -1,7 +1,7 @@
 package com.sheep.gamegroup.module.game.model;
 
-import com.sheep.gamegroup.model.api.IDownload;
 import com.sheep.gamegroup.model.entity.Applications;
+import com.sheep.gamegroup.module.game.api.IGameGroup;
 
 /**
  * Created by realicing on 2019/1/18.
@@ -51,7 +51,65 @@ public class SearchResp {
             return applications;
         }
         if(game_group != null){
-            return game_group.getApplications();
+            return game_group.getFirstApplications();
+        }
+        return null;
+    }
+
+    public static final int TYPE_GAME_GROUP = 1;
+    public static final int TYPE_GAME = 2;
+    /**
+     * 是否是游戏组数据
+     * @return
+     */
+    public boolean isGameGroup() {
+        return type == TYPE_GAME_GROUP;
+    }
+
+    public IGameGroup getGameGroup() {
+        switch (type){
+            case TYPE_GAME:
+                if(applications != null){
+                    return applications;
+                }
+                break;
+            case TYPE_GAME_GROUP:
+                if(game_group != null){
+                    return game_group;
+                }
+                break;
+        }
+        return null;
+    }
+
+    public String getPackage_size() {
+        switch (type){
+            case TYPE_GAME:
+                if(applications != null){
+                    return applications.getPackage_size()+"M";
+                }
+                break;
+            case TYPE_GAME_GROUP:
+                if(game_group != null){
+                    return game_group.getPackage_size()+"M";
+                }
+                break;
+        }
+        return "";
+    }
+
+    public String getIcon() {
+        switch (type){
+            case TYPE_GAME:
+                if(applications != null){
+                    return applications.getIcon();
+                }
+                break;
+            case TYPE_GAME_GROUP:
+                if(game_group != null){
+                    return game_group.getIcon();
+                }
+                break;
         }
         return null;
     }

+ 5 - 1
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -2246,7 +2246,7 @@ public class CommonUtil {
                     G.showToast(R.string.error_data);
                     return;
                 }
-                Jump2View.getInstance().goPlayGameDetail(activity, ext.getId());
+                Jump2View.getInstance().goPlayGameDetail(ext.getId());
                 break;
             case JUMP_FIND_RECOMMEND://发现--推荐
             case JUMP_FIND_ACT://发现--活动
@@ -2298,6 +2298,10 @@ public class CommonUtil {
      * @param i -1:不限制 否者限制tag 个数
      */
     public void paintLineaLayout(Applications app, LinearLayout ll_game_tag, int i, int color, int drawable) {
+        if(app == null){
+            ll_game_tag.removeAllViews();
+            return;
+        }
         List<GameListTag> gameListTagList = app.getTags();
         if (!ListUtil.isEmpty(gameListTagList)) {
             ll_game_tag.removeAllViews();

+ 109 - 38
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -6,7 +6,6 @@ import android.content.Intent;
 import android.content.pm.PackageManager;
 import android.net.Uri;
 import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
 import android.text.TextUtils;
 import android.view.Gravity;
 import android.view.View;
@@ -56,9 +55,13 @@ import com.sheep.gamegroup.module.find.activity.ActMediaChoose;
 import com.sheep.gamegroup.module.game.activity.ActDownloadManager;
 import com.sheep.gamegroup.module.game.activity.ActGameCenterType;
 import com.sheep.gamegroup.module.game.activity.ActGameGroupMore;
+import com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail;
 import com.sheep.gamegroup.module.game.activity.ActGameRank;
+import com.sheep.gamegroup.module.game.activity.ActMyGameList;
 import com.sheep.gamegroup.module.game.activity.ActSearchGameGroup;
 import com.sheep.gamegroup.module.game.model.GameCenterType;
+import com.sheep.gamegroup.module.game.model.GameGroup;
+import com.sheep.gamegroup.module.game.model.SearchResp;
 import com.sheep.gamegroup.module.login.ChangePasswordAct;
 import com.sheep.gamegroup.module.login.LoginAct;
 import com.sheep.gamegroup.module.plugin.model.Plugin;
@@ -99,7 +102,6 @@ import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.activity.ActMiDong;
 import com.sheep.gamegroup.view.activity.ActModifyThird;
 import com.sheep.gamegroup.view.activity.ActMyFocus;
-import com.sheep.gamegroup.module.game.activity.ActMyGameList;
 import com.sheep.gamegroup.view.activity.ActMyMoney;
 import com.sheep.gamegroup.view.activity.ActMyWelfare;
 import com.sheep.gamegroup.view.activity.ActNewAboutUs;
@@ -202,6 +204,8 @@ import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_ITEM;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_DOWNLOAD_WELFARE_LIST;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_EVERY_DAY_MORE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_GIFT_CENTER;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_GROUP_DETAIL;
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_GROUP_SEARCH;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_INSTEAD_OF_RECHARGE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_MY_WELFARE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GAME_PLAY_GAME_DETAIL;
@@ -403,7 +407,7 @@ public class Jump2View {
 
                 if (userEntity != null && userEntity.canBindMobile()
                         && !BuildConfig.DEBUG
-                        ) {//老用户没有绑定手机号
+                ) {//老用户没有绑定手机号
                     Jump2View.getInstance().goBindPhone(activity, 2);
                     return;
                 }
@@ -431,7 +435,7 @@ public class Jump2View {
 
                 if (userEntity != null && userEntity.canBindMobile()
                         && !BuildConfig.DEBUG
-                        ) {//老用户没有绑定手机号
+                ) {//老用户没有绑定手机号
                     Jump2View.getInstance().goBindPhone(activity, 1);
                     activity.finish();
                     return;
@@ -1000,17 +1004,17 @@ public class Jump2View {
             }
         }
         webParams.setUrl(url);
-        if(StringUtils.isImageUrl(url)){
+        if (StringUtils.isImageUrl(url)) {
             showImg(context, webParams);
             return;
-        } else if(StringUtils.isVideoUrl(url)){
+        } else if (StringUtils.isVideoUrl(url)) {
             goActPlayVideo(url, true);
             return;
         }
         Intent intent = new Intent(context, ActWebX5.class);
         intent.putExtra(WebParams.class.getSimpleName(), webParams);
-        if(webParams.isForResult()){
-            ((Activity)context).startActivityForResult(intent, webParams.getAction());
+        if (webParams.isForResult()) {
+            ((Activity) context).startActivityForResult(intent, webParams.getAction());
         } else {
             context.startActivity(intent);
         }
@@ -1194,6 +1198,7 @@ public class Jump2View {
         intent.putExtra(WebParams.class.getSimpleName(), webParams);
         context.startActivity(intent);
     }
+
     /**
      * 显示多张图片
      *
@@ -1507,7 +1512,7 @@ public class Jump2View {
 
     public void gotoLoginAgain(String o) {
         String token = SpUtils.getToken(SheepApp.getInstance());
-        if(TextUtils.isEmpty(token)) {
+        if (TextUtils.isEmpty(token)) {
             return;
         }
         SpUtils.saveToken(SheepApp.getInstance(), "");
@@ -1818,37 +1823,28 @@ public class Jump2View {
     /**
      * 发现模块--游戏详情界面
      *
-     * @param context
      * @param item
      */
-    public void goFindGame(Context context, Article item) {
-        Intent intent = new Intent(context, ActGcGameAppDetail.class);
-        intent.putExtra("id", item.getApplication_id());
-        context.startActivity(intent);
+    public void goFindGame(Article item) {
+        goPlayGameDetail(item.getApplication_id());
     }
 
     /**
      * 发现模块--游戏详情界面
      *
-     * @param activity
-     * @param findApp
+     * @param item
      */
-    public void goFindGame(Activity activity, Applications findApp) {
-        Intent intent = new Intent(activity, ActGcGameAppDetail.class);
-        intent.putExtra("id", findApp.getId());
-        activity.startActivity(intent);
+    public void goFindGame(Applications item) {
+        goPlayGameDetail(item.getId());
     }
 
     /**
      * 发现模块--游戏详情界面
      *
-     * @param activity
      * @param applicationId
      */
-    public void goFindGame(Activity activity, int applicationId) {
-        Intent intent = new Intent(activity, ActGcGameAppDetail.class);
-        intent.putExtra("id", applicationId);
-        activity.startActivity(intent);
+    public void goFindGame(int applicationId) {
+        goPlayGameDetail(applicationId);
     }
 
     /**
@@ -2092,12 +2088,13 @@ public class Jump2View {
     }
 
     /**
-     * 游戏详情
+     * 老的游戏详情
      */
-    public void goPlayGameDetail(Context context, int id) {
-        Intent intent = new Intent(context, ActGcGameAppDetail.class);
+    public void goOldPlayGameDetail(int id) {
+        Activity activity = SheepApp.getInstance().getCurrentActivity();
+        Intent intent = new Intent(activity, ActGcGameAppDetail.class);
         intent.putExtra("id", id);
-        context.startActivity(intent);
+        activity.startActivity(intent);
         GAME_PLAY_GAME_DETAIL.onEvent();
     }
 
@@ -2208,12 +2205,12 @@ public class Jump2View {
 
     //打开一个发现
     public void goFindItem(Context context, Article item) {
-        if(ArticleAd.showAd && ArticleAd.checkAdAndClick(item)){//检查点击的是否是 广告
+        if (ArticleAd.showAd && ArticleAd.checkAdAndClick(item)) {//检查点击的是否是 广告
             return;
         }
         switch (item.getType()) {//类型 1:游戏 2:咨询 3:转跳 4:任务 5:栏目
             case 1:
-                Jump2View.getInstance().goFindGame(context, item);
+                Jump2View.getInstance().goFindGame(item);
                 break;
             case 2:
                 Jump2View.getInstance().goFindInformation(context, item);
@@ -2412,7 +2409,7 @@ public class Jump2View {
                 goTaskDetailView(context, item.getLink_id());
                 break;
             case IHomePageSearch.LINK_TYPE_APPLICATIONS:
-                goPlayGameDetail(context, item.getLink_id());
+                goPlayGameDetail(item.getLink_id());
                 break;
         }
     }
@@ -2727,18 +2724,19 @@ public class Jump2View {
 
     /**
      * 小绵羊3.4.10新增 -- 跳转  界面 绵羊新游、免费道具、绵羊推荐、排行榜 界面
+     *
      * @param activity
      * @param item
      */
     public void goActGameCenterType(Activity activity, GameCenterType item) {
-        if(item == null){
+        if (item == null) {
             return;
         }
-        if(activity == null){
+        if (activity == null) {
             activity = SheepApp.getInstance().getCurrentActivity();
         }
         Intent intent;
-        switch (item.getId()){
+        switch (item.getId()) {
             case -1:
                 intent = new Intent(activity, ActGameRank.class);
                 break;
@@ -2749,8 +2747,10 @@ public class Jump2View {
         DataUtil.putObject(intent, item);
         activity.startActivity(intent);
     }
+
     /**
      * 小绵羊3.4.10新增 -- 跳转  下载管理 界面
+     *
      * @param activity
      */
     public void goActDownloadManager(Activity activity) {
@@ -2758,12 +2758,83 @@ public class Jump2View {
         activity.startActivity(new Intent(activity, ActDownloadManager.class));
         UMConfigUtils.onEvent(UMConfigUtils.Event.GAME_DOWNLOAD_MANAGER);
     }
+
     /**
-     * 新的游戏搜索
+     * 小绵羊3.4.10新增 -- 游戏组搜索
      */
-    public void goActpSearchGameGroup(Activity activity) {
+    public void goActSearchGameGroup(Activity activity) {
         Intent intent = new Intent(activity, ActSearchGameGroup.class);
         activity.startActivity(intent);
-        SEARCH_GAME.onEvent();
+        GAME_GROUP_SEARCH.onEvent();
+    }
+
+    /**
+     * 小绵羊3.4.10新增 -- 点击搜索游戏组结果
+     */
+    public void goSearchResp(SearchResp item) {
+        if (item.isGameGroup()) {
+            goActGameGroupDetail(item.getGame_group());
+        } else {
+            goFindGame(item.getApplications());
+        }
+    }
+
+    /**
+     * 小绵羊3.4.10新增 -- 游戏组详情界面
+     */
+    public void goActGameGroupDetail(GameGroup item) {
+        if(item == null){
+            G.showToast(R.string.please_contact_customer_service);
+            return;
+        }
+        SheepApp.getInstance().getNetComponent().getApiService().getGameGroupById(item.getId())
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        GameGroup gameGroup = baseMessage.getData(GameGroup.class);
+                        if (gameGroup == null) {
+                            G.showToast(R.string.please_contact_customer_service);
+                            return;
+                        }
+                        Activity activity = SheepApp.getInstance().getCurrentActivity();
+                        Intent intent = new Intent(activity, ActGameGroupOrGameDetail.class);
+                        if(gameGroup.getFirstApplications() != null)
+                            intent.putExtra("id", gameGroup.getFirstApplications().getId());
+                        DataUtil.putObject(intent, gameGroup);
+                        activity.startActivity(intent);
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+                });
+        GAME_GROUP_DETAIL.onEvent();
+    }
+
+    /**
+     * 小绵羊3.4.10新增 -- 游戏组游戏详情 界面
+     */
+    public void goPlayGameDetail(int id) {
+        Activity activity = SheepApp.getInstance().getCurrentActivity();
+        Intent intent = new Intent(activity, ActGameGroupOrGameDetail.class);
+        intent.putExtra("id", id);
+        activity.startActivity(intent);
+        GAME_PLAY_GAME_DETAIL.onEvent();
+    }
+
+    /**
+     * 抢购优惠
+     *
+     * @param app
+     */
+    public void gotoGameVipRecharge(Applications app) {
+        CommonUtil.getInstance().initUrlConfigByNet(Config.KEY_DIRECTIONAL_RECHARGE_URL, url -> {
+            url = url + "/" + app.getGame_discount_id() + "?authorization=" + SpUtils.getToken(SheepApp.getInstance()) + "&ssnocache=1";
+            WebParams webParams = new WebParams(url, "抢购优惠").setShowTitle(false);
+            Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), webParams);
+        });
     }
 }

+ 3 - 0
app/src/main/java/com/sheep/gamegroup/util/UMConfigUtils.java

@@ -189,6 +189,9 @@ public class UMConfigUtils {
         EXCHANGE_CMCC("移动积分兑换界面"),
         SEARCH_APP_OR_TASK("从主页进入搜索游戏或任务的搜索界面"),
         USER_INFO_ADDR("个人中心 -> 个人资料 -> 我的收件信息"),
+        GAME_GROUP_SEARCH("游戏中心 -> 搜索游戏组"),
+        GAME_GROUP_DETAIL("游戏中心 -> 搜索游戏组 -> 游戏组详情"),
+        GAME_GROUP_GAME_DETAIL("游戏中心 -> 搜索游戏组 -> 游戏组详情 -> 游戏详情"),
         ;
         private String tag;
 

+ 1 - 6
app/src/main/java/com/sheep/gamegroup/view/activity/ActArticle.java

@@ -224,12 +224,7 @@ public class ActArticle extends BaseActivity implements Action1<Integer> {
 
         updateView(this, findApp, find_information_game_task_center);
 
-        itemView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                Jump2View.getInstance().goFindGame(ActArticle.this, article);
-            }
-        });
+        itemView.setOnClickListener(view -> Jump2View.getInstance().goFindGame(article));
     }
 
     private List<String> list = ListUtil.emptyList();

+ 0 - 10
app/src/main/java/com/sheep/gamegroup/view/activity/ActDownloadWelfareList.java

@@ -44,14 +44,4 @@ public class ActDownloadWelfareList extends BaseActivity {
 
     }
 
-    @Override
-    public void initListener() {
-
-    }
-
-    @Override
-    public void initData() {
-
-    }
-
 }

+ 1 - 6
app/src/main/java/com/sheep/gamegroup/view/activity/ActReservation.java

@@ -155,12 +155,7 @@ public class ActReservation extends BaseActivity {
                     }
                 });
             }
-            itemView.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
-                    Jump2View.getInstance().goFindGame(ActReservation.this, findApp);
-                }
-            });
+            itemView.setOnClickListener(view -> Jump2View.getInstance().goFindGame(findApp));
         } else {
 
             ViewUtil.setText(find_information_game_name);

+ 1 - 7
app/src/main/java/com/sheep/gamegroup/view/activity/ActXiaomiGame.java

@@ -137,13 +137,7 @@ public class ActXiaomiGame extends BaseActivity {
                     item.getDownloadHelper().updateDownloadTaskView((Activity) activity, item, detail_task_tv_center);
                     detail_task_tv_center.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + item.getDownload_url());
                 }
-                rootConvertView.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-
-                        Jump2View.getInstance().goFindGame(activity, item.getId());
-                    }
-                });
+                rootConvertView.setOnClickListener(v -> Jump2View.getInstance().goFindGame(item.getId()));
             }
         });
         isRefresh = false;

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

@@ -176,7 +176,7 @@ public class MiddleAct extends Activity {
                 Jump2View.getInstance().newTaskTopStartAct(activity, SplashAct.class, bundle);
                 break;
             case IDConstant.JUMP_GMAE://游戏详情
-                Jump2View.getInstance().goPlayGameDetail(activity, msg.getId());
+                Jump2View.getInstance().goPlayGameDetail(msg.getId());
                 break;
             case IDConstant.JUMP_FIND_RECOMMEND://发现--推荐
             case IDConstant.JUMP_FIND_ACT://发现--活动

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

@@ -429,7 +429,7 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                     Jump2View.getInstance().goXiaomiGameList(activity, null);
                     break;
                 case JUMP_GMAE://游戏详情
-                    Jump2View.getInstance().goPlayGameDetail(activity, advertising.getLink_id());
+                    Jump2View.getInstance().goPlayGameDetail(advertising.getLink_id());
                     break;
                 case JUMP_FIND_RECOMMEND://发现--推荐
                 case JUMP_FIND_ACT://发现--活动

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGameCenter1_2List.java

@@ -75,7 +75,7 @@ public class AdpGameCenter1_2List extends RecyclerViewAdapter<ListTypeList<GameR
                             if(gameListTypeList.getType().getTitle() != null) {
                                 switch (gameListTypeList.getType().getTitle()) {
                                     case "天天更新":
-                                        Jump2View.getInstance().goPlayGameDetail((Activity) mContext, item.getAppId());
+                                        Jump2View.getInstance().goPlayGameDetail(item.getAppId());
                                         break;
                                     case "重点推荐":
                                         Jump2View.getInstance().goActPlayGameList((Activity) mContext, item.getType());

+ 1 - 6
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpGcGameAppList.java

@@ -35,12 +35,7 @@ public class AdpGcGameAppList extends RecyclerViewAdapter<Applications> {
             // 加载数据
             ViewUtil.setText(item_gc_game_app_tv, item.getName());
             GlideImageLoader.setGameImage(item_gc_game_app_iv, item.getIcon());
-            viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
-                @Override
-                public void onClick(View view) {
-                    Jump2View.getInstance().goPlayGameDetail(mContext, item.getId());
-                }
-            });
+            viewHolder.itemView.setOnClickListener(view -> Jump2View.getInstance().goPlayGameDetail(item.getId()));
         }
     }
 }

+ 1 - 6
app/src/main/java/com/sheep/gamegroup/view/adapter/AdpUserAppHomeComment.java

@@ -34,11 +34,6 @@ public class AdpUserAppHomeComment extends BaseQuickAdapter<UserComment, BaseVie
         else
             headerViewHelper = new UserCommentHelper(helper.itemView);
         headerViewHelper.loadHeaderViewData(item);
-        headerViewHelper.getUser_comment_detail_game_icon().setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                Jump2View.getInstance().goPlayGameDetail(null, item.getApp_id());
-            }
-        });
+        headerViewHelper.getUser_comment_detail_game_icon().setOnClickListener(view -> Jump2View.getInstance().goPlayGameDetail(item.getApp_id()));
     }
 }

+ 10 - 18
app/src/main/java/com/sheep/gamegroup/view/adapter/PlayGameItemAdapter.java

@@ -40,25 +40,17 @@ public class PlayGameItemAdapter extends AdbCommonRecycler<GameEntity>{
 
     @Override
     public void convert(ViewHolder holder, final GameEntity gameEntity) {
-        holder.itemView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Jump2View.getInstance().goPlayGameDetail((Activity) activity, gameEntity.getApp().getId());
-            }
-        });
+        holder.itemView.setOnClickListener(v -> Jump2View.getInstance().goPlayGameDetail(gameEntity.getApp().getId()));
         if(TestUtil.isTest())
-            holder.itemView.setOnLongClickListener(new View.OnLongClickListener() {
-                @Override
-                public boolean onLongClick(View view) {
-                    IDownload download = gameEntity.getDownload();
-                    DownloadUtil downloadUtil = new DownloadUtil();
-                    final DownLoadInfo downLoadInfo = downloadUtil.getDownloadTaskByUrl(download);
-                    downloadUtil.delete(downLoadInfo);
-                    downloadUtil.start(downloadUtil.getDownloadTaskByUrl(download));
-                    downloadUtil.setDownloadTaskStatus(download.getDownload_link(), DownloadUtil.STATUS_INIT);
-                    G.showToast("游戏下载开始");
-                    return true;
-                }
+            holder.itemView.setOnLongClickListener(view -> {
+                IDownload download = gameEntity.getDownload();
+                DownloadUtil downloadUtil = new DownloadUtil();
+                final DownLoadInfo downLoadInfo = downloadUtil.getDownloadTaskByUrl(download);
+                downloadUtil.delete(downLoadInfo);
+                downloadUtil.start(downloadUtil.getDownloadTaskByUrl(download));
+                downloadUtil.setDownloadTaskStatus(download.getDownload_link(), DownloadUtil.STATUS_INIT);
+                G.showToast("游戏下载开始");
+                return true;
             });
         View item_download_welfare_line = holder.itemView.findViewById(R.id.line_tv);
         TextView detail_task_tv_center = holder.itemView.findViewById(R.id.detail_task_tv_center);

+ 1 - 4
app/src/main/java/com/sheep/gamegroup/view/adapter/PlayGameListAdapter.java

@@ -81,10 +81,7 @@ public class PlayGameListAdapter extends AdbCommonRecycler<ListTypeList<GameEnti
     public static void setOnClickGameEntity(View view, final GameEntity item){
         if(item.getApp() != null){
             DownloadService.setDownLoadLongClick(view, item.getApp());
-            view.setOnClickListener(v -> {
-                Activity activity = SheepApp.getInstance().getCurrentActivity();
-                Jump2View.getInstance().goPlayGameDetail(activity, item.getApp().getId());
-            });
+            view.setOnClickListener(v -> Jump2View.getInstance().goPlayGameDetail(item.getApp().getId()));
         } else if(item.getRelease_task() != null) {
             DownloadService.setDownLoadLongClick(view, item.getRelease_task().getTask());
         }

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

@@ -290,12 +290,7 @@ public class FgtArticleComment extends BaseListFragment3<UserComment> implements
 
         updateView(activity, findApp, find_information_game_task_center);
 
-        itemView.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View view) {
-                Jump2View.getInstance().goFindGame(activity, article);
-            }
-        });
+        itemView.setOnClickListener(view -> Jump2View.getInstance().goFindGame(article));
     }
 
     public void initArticle() {

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

@@ -102,7 +102,7 @@ public class FgtFootprint extends BaseListFragment4<UserFootprint> {
                     switch (item.getType()) {
                         default:
                         case UserFootprint.TYPE_APP:
-                            Jump2View.getInstance().goPlayGameDetail(activity, item.getRelation_id());
+                            Jump2View.getInstance().goPlayGameDetail(item.getRelation_id());
                             break;
                         case UserFootprint.TYPE_ARTICLE:
                             Jump2View.getInstance().goFindItem(activity, item.getRelation_id());

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

@@ -74,12 +74,7 @@ public class FgtGameFocusList extends BaseListFragment2<UserFocusGame>{
                             });
                         }
                     });
-                    holder.itemView.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View view) {
-                            Jump2View.getInstance().goPlayGameDetail(view.getContext(), item.getTheFocusId());
-                        }
-                    });
+                    holder.itemView.setOnClickListener(view -> Jump2View.getInstance().goPlayGameDetail(item.getTheFocusId()));
 
                 }
             }

+ 6 - 9
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtUserCommentDetail.java

@@ -227,15 +227,12 @@ public class FgtUserCommentDetail extends BaseListFragment3<UserCommentReply> im
                 user_comment_detail_game_ll.setVisibility(View.VISIBLE);
                 user_comment_detail_line1.setVisibility(View.VISIBLE);
                 user_comment_detail_line2.setVisibility(View.VISIBLE);
-                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);
-                    }
+                user_comment_detail_game_ll.setOnClickListener(view -> {
+                    //点击游戏
+                    if (userCommentDetail.getUser_comment() != null)
+                        Jump2View.getInstance().goPlayGameDetail(userCommentDetail.getUser_comment().getApp_id());
+                    else
+                        G.showToast(R.string.loading_data);
                 });
             }
             ViewUtil.setText(total_count_tv, getString(R.string.total_x_comment, String.valueOf(userCommentDetail.getUser_comment_reply().getTotal())));

+ 22 - 42
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareCenter.java

@@ -107,12 +107,9 @@ public class FgtWelfareCenter extends BaseFragment{
                     ViewUtil.setText(item_hot_welfare_tv, item.getName());
                     DownloadService.setDownLoadLongClick(holder.itemView, item.getTask());
                 }
-                holder.itemView.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        if(item != null && item.getTask() != null)
-                            Jump2View.getInstance().goGameTaskDetailView(activity,  item.getId(), item.getTask().getThird_task_id(),1);
-                    }
+                holder.itemView.setOnClickListener(view -> {
+                    if(item != null && item.getTask() != null)
+                        Jump2View.getInstance().goGameTaskDetailView(activity,  item.getId(), item.getTask().getThird_task_id(),1);
                 });
             }
         });
@@ -121,15 +118,12 @@ public class FgtWelfareCenter extends BaseFragment{
         wcDownloadWelfareList.setHasFixedSize(true);
         wcDownloadWelfareList.setNestedScrollingEnabled(false);
         wcDownloadWelfareList.setLayoutManager(downloadLayoutManager);
-        wcDownloadWelfareList.setAdapter(new WelfareAdapter(activity, downloadWelfareList, new Action1<Integer>() {
-            @Override
-            public void call(Integer integer) {
-                switch (integer){
-                    case WelfareAdapter.TO_REFRESH:
-                        refreshDownloadWelfare = true;
-                        refreshData();
-                        break;
-                }
+        wcDownloadWelfareList.setAdapter(new WelfareAdapter(activity, downloadWelfareList, integer -> {
+            switch (integer){
+                case WelfareAdapter.TO_REFRESH:
+                    refreshDownloadWelfare = true;
+                    refreshData();
+                    break;
             }
         }));
         //礼包中心
@@ -137,23 +131,15 @@ public class FgtWelfareCenter extends BaseFragment{
         wcGiftCenterList.setHasFixedSize(true);
         wcGiftCenterList.setNestedScrollingEnabled(false);
         wcGiftCenterList.setLayoutManager(layoutManager);
-        wcGiftCenterList.setAdapter(new GiftCenterAdapter(activity, giftCenterList, new Action1<Integer>() {
-            @Override
-            public void call(Integer integer) {
-                switch (integer){
-                    case WelfareAdapter.TO_REFRESH:
-                        refreshGiftCenter = true;
-                        refreshData();
-                        break;
-                }
+        wcGiftCenterList.setAdapter(new GiftCenterAdapter(activity, giftCenterList, integer -> {
+            switch (integer){
+                case WelfareAdapter.TO_REFRESH:
+                    refreshGiftCenter = true;
+                    refreshData();
+                    break;
             }
         }));
-        refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
-            @Override
-            public void onRefresh() {
-                initData();
-            }
-        });
+        refresh.setOnRefreshListener(this::initData);
     }
 
     @Override
@@ -192,8 +178,7 @@ public class FgtWelfareCenter extends BaseFragment{
                             ArrayList<Release_task> newList = baseMessage.getDataList(Release_task.class);
                             hotWelfareList.clear();
                             ListUtil.addAll(hotWelfareList, newList);
-                            if(wcHotWelfareList != null)
-                                wcHotWelfareList.getAdapter().notifyDataSetChanged();
+                            ViewUtil.notifyDataSetChanged(wcHotWelfareList);
                             notifyDataSetChanged();
                         }
 
@@ -201,8 +186,7 @@ public class FgtWelfareCenter extends BaseFragment{
                         public void onError(BaseMessage baseMessage) {
                             refreshHotWelfare = false;
                             hotWelfareList.clear();
-                            if(wcHotWelfareList != null)
-                                wcHotWelfareList.getAdapter().notifyDataSetChanged();
+                            ViewUtil.notifyDataSetChanged(wcHotWelfareList);
                             notifyDataSetChanged();
                         }
                     });
@@ -219,8 +203,7 @@ public class FgtWelfareCenter extends BaseFragment{
                             ArrayList<Release_task> newList = baseMessage.getDataList(Release_task.class);
                             downloadWelfareList.clear();
                             ListUtil.addAll(downloadWelfareList, newList);
-                            if(wcDownloadWelfareList != null)
-                                wcDownloadWelfareList.getAdapter().notifyDataSetChanged();
+                            ViewUtil.notifyDataSetChanged(wcDownloadWelfareList);
                             notifyDataSetChanged();
                         }
 
@@ -228,8 +211,7 @@ public class FgtWelfareCenter extends BaseFragment{
                         public void onError(BaseMessage baseMessage) {
                             refreshDownloadWelfare = false;
                             downloadWelfareList.clear();
-                            if(wcDownloadWelfareList != null)
-                                wcDownloadWelfareList.getAdapter().notifyDataSetChanged();
+                            ViewUtil.notifyDataSetChanged(wcDownloadWelfareList);
                             notifyDataSetChanged();
                         }
                     });
@@ -246,8 +228,7 @@ public class FgtWelfareCenter extends BaseFragment{
                             ArrayList<GiftBagApp> newList = baseMessage.getDataList(GiftBagApp.class);
                             giftCenterList.clear();
                             ListUtil.addAll(giftCenterList, newList);
-                            if(wcGiftCenterList != null)
-                                wcGiftCenterList.getAdapter().notifyDataSetChanged();
+                            ViewUtil.notifyDataSetChanged(wcGiftCenterList);
                             notifyDataSetChanged();
                         }
 
@@ -255,8 +236,7 @@ public class FgtWelfareCenter extends BaseFragment{
                         public void onError(BaseMessage baseMessage) {
                             refreshGiftCenter = false;
                             giftCenterList.clear();
-                            if(wcGiftCenterList != null)
-                                wcGiftCenterList.getAdapter().notifyDataSetChanged();
+                            ViewUtil.notifyDataSetChanged(wcGiftCenterList);
                             notifyDataSetChanged();
                         }
                     });

+ 8 - 0
app/src/main/res/drawable/shape_vip_gradient_rectangle_15.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <gradient
+        android:endColor="#FCDFC8"
+        android:startColor="#DAB69D" />
+    <corners android:radius="15dp" />
+</shape>

+ 254 - 0
app/src/main/res/layout/act_game_group_or_game_detail.xml

@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white"
+    tools:context="com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail">
+
+    <TextView
+        android:id="@+id/gc_game_app_detail_bt2"
+        style="@style/style_button"
+        android:layout_alignParentBottom="true"
+        android:text="下载" />
+
+    <View
+        android:id="@+id/gc_game_app_detail_line"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_above="@id/gc_game_app_detail_bt2"
+        android:background="#F2F2F2" />
+
+    <com.scwang.smartrefresh.layout.SmartRefreshLayout
+        android:id="@+id/refresh"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_above="@id/gc_game_app_detail_line">
+
+        <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">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:orientation="vertical">
+
+                <RelativeLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+
+                    <ImageView
+                        android:id="@+id/gc_game_app_detail_iv"
+                        android:layout_width="match_parent"
+                        android:layout_height="216dp"
+                        android:scaleType="centerCrop"
+                        android:src="@drawable/loading_01" />
+
+                    <ImageView
+                        android:id="@+id/gc_game_app_detail_iv2"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:adjustViewBounds="true"
+                        android:scaleType="fitXY"
+                        android:src="@drawable/loading_01"
+                        android:visibility="gone" />
+
+                    <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_black" />
+
+                    <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="@mipmap/share" />
+
+                    <ImageView
+                        android:id="@+id/gc_game_app_detail_play_iv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_centerInParent="true"
+                        android:src="@drawable/ic_play_but_image"
+                        android:visibility="gone" />
+
+                </RelativeLayout>
+
+                <android.support.constraint.ConstraintLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+
+                    <ImageView
+                        android:id="@+id/gc_game_app_detail_icon"
+                        android:layout_width="106dp"
+                        android:layout_height="106dp"
+                        android:layout_marginStart="16dp"
+                        android:layout_marginTop="20dp"
+                        android:src="@drawable/icon_lj"
+                        app:layout_constraintBottom_toTopOf="@id/gc_game_app_comment_score"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <android.support.v7.widget.AppCompatRatingBar
+                        android:id="@+id/gc_game_app_comment_score"
+                        style="@style/style_rating_bar"
+                        android:layout_width="wrap_content"
+                        android:layout_marginTop="20dp"
+                        android:layout_marginBottom="20dp"
+                        android:isIndicator="true"
+                        android:numStars="5"
+                        android:rating="0"
+                        android:stepSize="0.5"
+                        app:layout_constraintBottom_toBottomOf="parent"
+                        app:layout_constraintStart_toStartOf="@id/gc_game_app_detail_icon"
+                        app:layout_constraintTop_toBottomOf="@id/gc_game_app_detail_icon" />
+
+                    <TextView
+                        android:id="@+id/gc_game_app_detail_score_tv"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="7dp"
+                        android:text="8.6分"
+                        android:textColor="#ffffd042"
+                        android:textSize="12sp"
+                        app:layout_constraintBottom_toBottomOf="@id/gc_game_app_comment_score"
+                        app:layout_constraintStart_toEndOf="@id/gc_game_app_comment_score"
+                        app:layout_constraintTop_toTopOf="@id/gc_game_app_comment_score" />
+
+                    <TextView
+                        android:id="@+id/gc_game_app_detail_name"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="23dp"
+                        android:layout_marginEnd="16dp"
+                        android:gravity="center_vertical"
+                        android:text="永恒仙域"
+                        android:textColor="#ff333333"
+                        android:textSize="18sp"
+                        app:layout_constraintBottom_toTopOf="@id/gc_game_app_detail_tag_list"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toEndOf="@id/gc_game_app_detail_icon"
+                        app:layout_constraintTop_toTopOf="@+id/gc_game_app_detail_icon" />
+
+                    <android.support.v7.widget.RecyclerView
+                        android:id="@+id/gc_game_app_detail_tag_list"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginEnd="16dp"
+                        app:layout_constraintBottom_toTopOf="@id/gc_game_app_detail_info_tv"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="@id/gc_game_app_detail_name"
+                        app:layout_constraintTop_toBottomOf="@id/gc_game_app_detail_name" />
+
+                    <TextView
+                        android:id="@+id/gc_game_app_detail_info_tv"
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_marginEnd="16dp"
+                        android:text="418M     230万人在玩"
+                        android:textColor="#ff999999"
+                        android:textSize="12sp"
+                        app:layout_constraintBottom_toTopOf="@id/gc_game_app_detail_bt1"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintStart_toStartOf="@id/gc_game_app_detail_name"
+                        app:layout_constraintTop_toBottomOf="@id/gc_game_app_detail_tag_list" />
+
+                    <TextView
+                        android:id="@+id/gc_game_app_detail_bt1"
+                        android:layout_width="wrap_content"
+                        android:layout_height="30dp"
+                        android:background="@drawable/selector_button_stroke_main"
+                        android:gravity="center"
+                        android:onClick="onClickFollowTv"
+                        android:paddingStart="24dp"
+                        android:paddingEnd="24dp"
+                        android:text="关注"
+                        android:textColor="@color/selector_color_stoke_main_btn"
+                        android:textSize="14sp"
+                        app:layout_constraintBottom_toBottomOf="@id/gc_game_app_comment_score"
+                        app:layout_constraintStart_toStartOf="@id/gc_game_app_detail_name" />
+
+                    <TextView
+                        android:id="@+id/gc_game_app_detail_bt3"
+                        android:layout_width="wrap_content"
+                        android:layout_height="30dp"
+                        android:layout_marginStart="30dp"
+                        android:background="@drawable/shape_vip_gradient_rectangle_15"
+                        android:gravity="center"
+                        android:paddingStart="10dp"
+                        android:paddingEnd="10dp"
+                        android:text="会员通道"
+                        android:textColor="#714E36"
+                        android:textSize="14sp"
+                        app:layout_constraintBottom_toBottomOf="@id/gc_game_app_comment_score"
+                        app:layout_constraintStart_toEndOf="@id/gc_game_app_detail_bt1" />
+
+                </android.support.constraint.ConstraintLayout>
+
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="10dp"
+                    android:background="#fff5f5f5" />
+
+                <include
+                    android:id="@+id/gc_game_app_detail_game_list"
+                    layout="@layout/item_gc_game_app_detail_list"/>
+
+                <android.support.design.widget.TabLayout
+                    android:id="@+id/tabLayout"
+                    style="@style/style_tab"
+                    android:layout_height="48dp"
+                    app:tabIndicatorHeight="2dp" />
+
+                <include layout="@layout/line_1px_hor" />
+
+
+                <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" />
+
+            </LinearLayout>
+
+        </android.support.v4.widget.NestedScrollView>
+
+    </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+
+    <com.kfzs.duanduan.view.DragRelativeLayout
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentEnd="true"
+        android:layout_marginTop="300dp"
+        android:onClick="onClickPlusDrag"
+        android:paddingTop="@dimen/content_padding_10"
+        android:paddingBottom="@dimen/content_padding_10">
+
+        <ImageView
+            android:id="@+id/write_comment"
+            android:layout_width="45dp"
+            android:layout_height="wrap_content"
+            android:adjustViewBounds="true"
+            android:scaleType="fitXY" />
+    </com.kfzs.duanduan.view.DragRelativeLayout>
+
+</RelativeLayout>

+ 3 - 3
app/src/main/res/layout/fgt_gc_game_app_detail.xml

@@ -7,9 +7,9 @@
     <android.support.v7.widget.RecyclerView
         android:id="@+id/gc_game_app_detail_pic_list"
         android:layout_width="match_parent"
-        android:layout_height="200dp"
-        android:layout_marginTop="@dimen/dp_10"
-        android:layout_marginBottom="@dimen/dp_10" />
+        android:layout_height="130dp"
+        android:layout_marginTop="20dp"
+        android:layout_marginBottom="20dp" />
 
     <android.support.v7.widget.RecyclerView
         android:id="@+id/gc_game_app_detail_info_list"

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

@@ -51,7 +51,7 @@
         android:id="@+id/item_dm_btn_tv"
         style="@style/style_button_find"
         android:layout_marginBottom="16dp"
-        android:text="下载"
+        android:text="查看详情"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintTop_toTopOf="parent" />

+ 105 - 0
app/src/main/res/layout/item_game_group_game_compare.xml

@@ -0,0 +1,105 @@
+<?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"
+    android:paddingStart="16dp"
+    android:paddingTop="20dp"
+    android:paddingEnd="16dp">
+
+    <TextView
+        android:id="@+id/item_gggc_vip_tv"
+        android:layout_width="wrap_content"
+        android:layout_height="30dp"
+        android:background="@drawable/shape_vip_gradient_rectangle_15"
+        android:gravity="center"
+        android:paddingStart="10dp"
+        android:paddingEnd="10dp"
+        android:text="会员通道"
+        android:textColor="#714E36"
+        android:textSize="14sp"
+        app:layout_constraintBottom_toBottomOf="@id/item_gggc_ll2"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/item_gggc_ll1"
+        app:layout_constraintTop_toTopOf="@id/item_gggc_ll1" />
+
+    <LinearLayout
+        android:id="@+id/item_gggc_ll1"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="20dp"
+        android:layout_marginEnd="10dp"
+        android:gravity="center_vertical"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toTopOf="@id/item_gggc_ll2"
+        app:layout_constraintEnd_toStartOf="@id/item_gggc_vip_tv"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent">
+
+        <TextView
+            android:id="@+id/item_gggc_name_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="小米"
+            android:textColor="#ff333333"
+            android:textSize="14sp" />
+
+        <TextView
+            android:id="@+id/item_gggc_info_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2"
+            android:text="230万人在玩"
+            android:textColor="#ff2ebef2"
+            android:textSize="12sp" />
+    </LinearLayout>
+
+    <LinearLayout
+        android:id="@+id/item_gggc_ll2"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="10dp"
+        android:layout_marginEnd="10dp"
+        android:gravity="center_vertical"
+        android:orientation="horizontal"
+        app:layout_constraintBottom_toTopOf="@id/item_gggc_line"
+        app:layout_constraintEnd_toStartOf="@id/item_gggc_vip_tv"
+        app:layout_constraintStart_toStartOf="@id/item_gggc_ll1"
+        app:layout_constraintTop_toBottomOf="@id/item_gggc_ll1">
+
+
+        <TextView
+            android:id="@+id/item_gggc_score_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="8.6分"
+            android:textColor="#ffffd042"
+            android:textSize="12sp" />
+
+        <RelativeLayout
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="2">
+
+            <android.support.v7.widget.AppCompatRatingBar
+                android:id="@+id/item_gggc_score_acrb"
+                style="@style/style_rating_bar"
+                android:layout_width="wrap_content"
+                android:isIndicator="true"
+                android:numStars="5"
+                android:rating="0"
+                android:stepSize="0.5" />
+        </RelativeLayout>
+    </LinearLayout>
+
+    <View
+        android:id="@+id/item_gggc_line"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginTop="16dp"
+        android:background="#F2F2F2"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/item_gggc_ll2" />
+</android.support.constraint.ConstraintLayout>