Kaynağa Gözat

游戏任务列表

liujiangyao 7 yıl önce
ebeveyn
işleme
95c7641e11

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

@@ -591,6 +591,8 @@
             android:screenOrientation="portrait"/>
         <activity android:name="com.sheep.gamegroup.view.activity.MessageInteractionDetailActivity"
             android:exported="true"/>
+        <activity android:name="com.sheep.gamegroup.view.activity.ActEverydayPlayGame"
+            android:exported="true"/>
 
         <!--start幂动科技-->
 

+ 1 - 80
app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java

@@ -1260,7 +1260,7 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
                 .setOnBannerListener(new OnBannerListener() {
                     @Override
                     public void OnBannerClick(int i) {
-                        clickBanner(i);
+                        CommonUtil.getInstance().clickBanner(activity,i, slideshowEtyLists);
                     }
                 });
 
@@ -1286,85 +1286,6 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
 //        banner.start();
     }
 
-    private void clickBanner(int position) {
-        SlideshowEty clickedGameObj = ListUtil.getItem(slideshowEtyLists, position);
-        if (clickedGameObj == null) {
-            return;
-        }
-        UMConfigUtils.onEvent(UMConfigUtils.Event.BANNER_CLICK_HORIZONTAL);
-        UMConfigUtils.IdEvent.BANNER.commit(clickedGameObj.getId());
-        switch (clickedGameObj.getType()) {// 0,类型 1跳转试玩赚钱、2单个任务详情、3信用卡办理、4 H5页面、5 微信二维码任务
-            case 1:
-                Jump2View.getInstance()
-                        .goTryplayView(activity, null);
-                break;
-            case 2:
-                try {
-                    Jump2View.getInstance()
-                            .goTaskDetailView(activity, EntityUtils.getExtInfo(clickedGameObj.getExt()).getId());
-                } catch (Exception e) {
-                    e.printStackTrace();
-                }
-                break;
-            case 3:
-                Jump2View.getInstance()
-                        .goCreditCardTaskList(activity, 3);
-                break;
-            case 4:
-                if (!TextUtils.isEmpty(clickedGameObj.getObjects())) {
-                    Ext ext = EntityUtils.getExtInfo(clickedGameObj.getExt());
-                    if (ext.getTitle() == null)//外部浏览器加载H5
-                        Jump2View.getInstance().goWeb(activity, ext.getUrl());
-                    else//内部WebView加载H5
-                        Jump2View.getInstance().goWeb(activity, ext.getUrl(), ext.getTitle());
-
-                }
-
-                break;
-            case 5:
-                if (!TextUtils.isEmpty(clickedGameObj.getObjects())) {
-
-                    Jump2View.getInstance()
-                            .goWeb(
-                                    activity,
-                                    clickedGameObj.getObjects(),
-                                    "微信二维码辅助好友注册任务");
-                }
-
-                break;
-            case 6://连续任务
-                Jump2View.getInstance().goSequentialTaskView(activity);
-                break;
-            case 9://打卡赚钱
-                showToast("打卡赚钱");
-                Jump2View.getInstance().goSignCardAct(activity, null);
-                break;
-            case 7://玩转游戏
-                Jump2View.getInstance()
-                        .goMainGame(activity);
-                break;
-            case 11://游戏任务
-                Jump2View.getInstance()
-                        .goGameMakeMoney(activity, 0);
-                break;
-            case 12://闲玩任务
-                Jump2View.getInstance().goXianwanWeb(activity, null, null);
-                break;
-            case 13://游戏代充
-                Jump2View.getInstance().goGameRecharge(activity, null);
-                break;
-            case 14://幂动科技
-                Jump2View.getInstance().goMiDong(activity, null);
-                break;
-            case 15://小米游戏列表
-                Jump2View.getInstance().goXiaomiGameList(activity, null);
-                break;
-            default:
-                G.showToast(R.string.coming_soon);
-                break;
-        }
-    }
-
     /**
      * 公共
      */

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

@@ -881,4 +881,13 @@ public interface ApiService {
      */
     @GET("app/game_consumption/voucher_use_log")
     Observable<BaseMessage> getMyWelfareLogList(@Query("page") int page, @Query("per_page") int per_page);
+    /**
+     * 玩转游戏——每日必玩
+     * 玩转游戏——近期最热
+     * is_hot:1  others:0
+     * daily_play:1每日必玩
+     * type: 1002:快发出包 1003:腾讯出包 1004:小米出包 1099:其他
+     */
+    @GET("app/find")
+    Observable<BaseMessage> playgameDailyOrHotOrTypePlay(@Query("page") int page, @Query("per_page") int per_page, @Query("is_hot") int is_hot, @Query("daily_play") int daily_play, @Query("type") int type);
 }

+ 8 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/FindTag.java

@@ -18,6 +18,14 @@ public class FindTag {
 
     private int created_at;
 
+    public FindTag() {
+    }
+
+    public FindTag(int id, String name) {
+        this.id = id;
+        this.name = name;
+    }
+
     public void setUpdated_at(int updated_at){
         this.updated_at = updated_at;
     }

+ 315 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/PlayGameEntity.java

@@ -0,0 +1,315 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * 玩转游戏
+ * Created by ljy on 2018/9/3.
+ */
+
+public class PlayGameEntity {
+    private int Id;//integer($int64)
+    private int IsHot;//integer($int64)是否近期最热 1是 2不是
+
+    private int IsPlay;//integer($int64)是否每日必玩 1是 2不是
+
+    private int available_receive;//integer($int64)0:可领取账号 1:不可领取账号
+
+    private long created_at;//integer($int64)
+    private int download;//integer($int64)1:可下载 其他:不可下载
+
+    private long download_at;//integer($int64)预约下载开放时间
+
+    private long download_count;//integer($int64)下载数量
+
+    private long download_count_increment;//integer($int64)下载数量的增量
+
+    private int download_type;//integer($int32)1:非预约下载 2:预约下载
+
+    private String download_url;//string下载地址
+
+    private String icon;//string应用图标
+
+    private String intro;//string应用简介
+
+    private int is_recommend;//integer($int32)是否推荐:0:不推荐 1:推荐
+
+    private String manufacturer;//string厂商
+
+    private String name;//string应用名称
+
+    private String package_id;//stringGameID
+
+    private String package_name;//string应用包名称
+
+    private float package_size;//number($float)包大小(M)
+
+    private int package_type;//integer($int64)出包类型:1:快发出包 2:腾讯出包 3:小米出包 4:其它
+
+    private String pictures;//string宣传图标(分号隔开)
+
+    private int platform;//integer($int32)平台 0:全 1:安卓 2:IOS
+
+    private int receive_account;//integer($int64)0:未领取账号 1:已领取账号
+
+    private int record;//integer($int64)1:可记录 其他:不可记录
+
+    private float score;//number($float)评分
+
+    private long score_count;//integer($int64)评分人数
+
+    private int sort;//integer($int64)排序:越大越靠前
+
+    private int status;//integer($int32)1:开启 2:关闭
+
+    private String type;//string类型
+
+    private long updated_at;//integer($int64)
+    private String versions;//string版本号
+
+    public int getId() {
+        return Id;
+    }
+
+    public void setId(int id) {
+        Id = id;
+    }
+
+    public int getIsHot() {
+        return IsHot;
+    }
+
+    public void setIsHot(int isHot) {
+        IsHot = isHot;
+    }
+
+    public int getIsPlay() {
+        return IsPlay;
+    }
+
+    public void setIsPlay(int isPlay) {
+        IsPlay = isPlay;
+    }
+
+    public int getAvailable_receive() {
+        return available_receive;
+    }
+
+    public void setAvailable_receive(int available_receive) {
+        this.available_receive = available_receive;
+    }
+
+    public long getCreated_at() {
+        return created_at;
+    }
+
+    public void setCreated_at(long created_at) {
+        this.created_at = created_at;
+    }
+
+    public int getDownload() {
+        return download;
+    }
+
+    public void setDownload(int download) {
+        this.download = download;
+    }
+
+    public long getDownload_at() {
+        return download_at;
+    }
+
+    public void setDownload_at(long download_at) {
+        this.download_at = download_at;
+    }
+
+    public long getDownload_count() {
+        return download_count;
+    }
+
+    public void setDownload_count(long download_count) {
+        this.download_count = download_count;
+    }
+
+    public long getDownload_count_increment() {
+        return download_count_increment;
+    }
+
+    public void setDownload_count_increment(long download_count_increment) {
+        this.download_count_increment = download_count_increment;
+    }
+
+    public int getDownload_type() {
+        return download_type;
+    }
+
+    public void setDownload_type(int download_type) {
+        this.download_type = download_type;
+    }
+
+    public String getDownload_url() {
+        return download_url;
+    }
+
+    public void setDownload_url(String download_url) {
+        this.download_url = download_url;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public String getIntro() {
+        return intro;
+    }
+
+    public void setIntro(String intro) {
+        this.intro = intro;
+    }
+
+    public int getIs_recommend() {
+        return is_recommend;
+    }
+
+    public void setIs_recommend(int is_recommend) {
+        this.is_recommend = is_recommend;
+    }
+
+    public String getManufacturer() {
+        return manufacturer;
+    }
+
+    public void setManufacturer(String manufacturer) {
+        this.manufacturer = manufacturer;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getPackage_id() {
+        return package_id;
+    }
+
+    public void setPackage_id(String package_id) {
+        this.package_id = package_id;
+    }
+
+    public String getPackage_name() {
+        return package_name;
+    }
+
+    public void setPackage_name(String package_name) {
+        this.package_name = package_name;
+    }
+
+    public float getPackage_size() {
+        return package_size;
+    }
+
+    public void setPackage_size(float package_size) {
+        this.package_size = package_size;
+    }
+
+    public int getPackage_type() {
+        return package_type;
+    }
+
+    public void setPackage_type(int package_type) {
+        this.package_type = package_type;
+    }
+
+    public String getPictures() {
+        return pictures;
+    }
+
+    public void setPictures(String pictures) {
+        this.pictures = pictures;
+    }
+
+    public int getPlatform() {
+        return platform;
+    }
+
+    public void setPlatform(int platform) {
+        this.platform = platform;
+    }
+
+    public int getReceive_account() {
+        return receive_account;
+    }
+
+    public void setReceive_account(int receive_account) {
+        this.receive_account = receive_account;
+    }
+
+    public int getRecord() {
+        return record;
+    }
+
+    public void setRecord(int record) {
+        this.record = record;
+    }
+
+    public float getScore() {
+        return score;
+    }
+
+    public void setScore(float score) {
+        this.score = score;
+    }
+
+    public long getScore_count() {
+        return score_count;
+    }
+
+    public void setScore_count(long score_count) {
+        this.score_count = score_count;
+    }
+
+    public int getSort() {
+        return sort;
+    }
+
+    public void setSort(int sort) {
+        this.sort = sort;
+    }
+
+    public int getStatus() {
+        return status;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public long getUpdated_at() {
+        return updated_at;
+    }
+
+    public void setUpdated_at(long updated_at) {
+        this.updated_at = updated_at;
+    }
+
+    public String getVersions() {
+        return versions;
+    }
+
+    public void setVersions(String versions) {
+        this.versions = versions;
+    }
+}

+ 81 - 0
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -36,12 +36,14 @@ import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.alipay.PayResult;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.DialogConfig;
+import com.sheep.gamegroup.model.entity.Ext;
 import com.sheep.gamegroup.model.entity.FindApp;
 import com.sheep.gamegroup.model.entity.GameAccountEntity;
 import com.sheep.gamegroup.model.entity.HomeListEntity;
 import com.sheep.gamegroup.model.entity.NewbieTask;
 import com.sheep.gamegroup.model.entity.NewbieTaskRecord;
 import com.sheep.gamegroup.model.entity.RouserArticlesEntity;
+import com.sheep.gamegroup.model.entity.SlideshowEty;
 import com.sheep.gamegroup.model.entity.TaskChild;
 import com.sheep.gamegroup.model.entity.TaskDescEntity;
 import com.sheep.gamegroup.model.entity.TaskEty;
@@ -50,6 +52,7 @@ import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.WithdrawalEty;
 import com.sheep.gamegroup.model.entity.XiaomiGameEntity;
 import com.sheep.gamegroup.model.util.AutoTaskListUtil;
+import com.sheep.gamegroup.model.util.EntityUtils;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.usage.AppUsageManager;
 import com.sheep.gamegroup.view.activity.GameTaskOrderListAct;
@@ -1910,4 +1913,82 @@ public class CommonUtil {
                     }
                 });
     }
+    public void clickBanner(Activity activity, int position, List<SlideshowEty> slideshowEtyLists) {
+        SlideshowEty clickedGameObj =  ListUtil.getItem(slideshowEtyLists, position);
+        if (clickedGameObj == null) {
+            return;
+        }
+        UMConfigUtils.onEvent(UMConfigUtils.Event.BANNER_CLICK_HORIZONTAL);
+        UMConfigUtils.IdEvent.BANNER.commit(clickedGameObj.getId());
+        switch (clickedGameObj.getType()) {// 0,类型 1跳转试玩赚钱、2单个任务详情、3信用卡办理、4 H5页面、5 微信二维码任务
+            case 1:
+                Jump2View.getInstance()
+                        .goTryplayView(activity, null);
+                break;
+            case 2:
+                try {
+                    Jump2View.getInstance()
+                            .goTaskDetailView(activity, EntityUtils.getExtInfo(clickedGameObj.getExt()).getId());
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+                break;
+            case 3:
+                Jump2View.getInstance()
+                        .goCreditCardTaskList(activity, 3);
+                break;
+            case 4:
+                if (!TextUtils.isEmpty(clickedGameObj.getObjects())) {
+                    Ext ext = EntityUtils.getExtInfo(clickedGameObj.getExt());
+                    if (ext.getTitle() == null)//外部浏览器加载H5
+                        Jump2View.getInstance().goWeb(activity, ext.getUrl());
+                    else//内部WebView加载H5
+                        Jump2View.getInstance().goWeb(activity, ext.getUrl(), ext.getTitle());
+
+                }
+
+                break;
+            case 5:
+                if (!TextUtils.isEmpty(clickedGameObj.getObjects())) {
+
+                    Jump2View.getInstance()
+                            .goWeb(
+                                    activity,
+                                    clickedGameObj.getObjects(),
+                                    "微信二维码辅助好友注册任务");
+                }
+
+                break;
+            case 6://连续任务
+                Jump2View.getInstance().goSequentialTaskView(activity);
+                break;
+            case 9://打卡赚钱
+                G.showToast("打卡赚钱");
+                Jump2View.getInstance().goSignCardAct(activity, null);
+                break;
+            case 7://玩转游戏
+                Jump2View.getInstance()
+                        .goMainGame(activity);
+                break;
+            case 11://游戏任务
+                Jump2View.getInstance()
+                        .goGameMakeMoney(activity, 0);
+                break;
+            case 12://闲玩任务
+                Jump2View.getInstance().goXianwanWeb(activity, null, null);
+                break;
+            case 13://游戏代充
+                Jump2View.getInstance().goGameRecharge(activity, null);
+                break;
+            case 14://幂动科技
+                Jump2View.getInstance().goMiDong(activity, null);
+                break;
+            case 15://小米游戏列表
+                Jump2View.getInstance().goXiaomiGameList(activity, null);
+                break;
+            default:
+                G.showToast(R.string.coming_soon);
+                break;
+        }
+    }
 }

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

@@ -39,6 +39,7 @@ import com.sheep.gamegroup.view.activity.ActBindMobileRegister;
 import com.sheep.gamegroup.view.activity.ActCreditCardTaskList;
 import com.sheep.gamegroup.view.activity.ActCreditCardWeb;
 import com.sheep.gamegroup.view.activity.ActDownloadWelfareList;
+import com.sheep.gamegroup.view.activity.ActEverydayPlayGame;
 import com.sheep.gamegroup.view.activity.ActFindGame;
 import com.sheep.gamegroup.view.activity.ActFindInformation;
 import com.sheep.gamegroup.view.activity.ActGameAccount;
@@ -1520,4 +1521,12 @@ public class Jump2View {
         activity.startActivity(intent);
         GAME_MY_WELFARE.onEvent();
     }
+    /**
+     * 每日必做、近期最热
+     */
+    public void goEverydayOrCurrentHotGame(Activity activity, int type){
+        Intent intent = new Intent(activity, ActEverydayPlayGame.class);
+        intent.putExtra("type", type);
+        activity.startActivity(intent);
+    }
 }

+ 53 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActEverydayPlayGame.java

@@ -0,0 +1,53 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.support.v7.widget.RecyclerView;
+
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.PlayGameEntity;
+import com.sheep.gamegroup.view.adapter.PlayGameItemAdapter;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import java.util.Locale;
+
+import rx.Observable;
+
+/**
+ * 每日必做和热门
+ * Created by ljy on 2018/9/3.
+ */
+
+public class ActEverydayPlayGame extends BaseListActivity<PlayGameEntity> {
+    private int type;
+    @Override
+    protected RecyclerView.Adapter getAdapter() {
+        return new PlayGameItemAdapter(activity, list);
+    }
+
+    @Override
+    protected String getKey(int page, int per_page) {
+        return type == 0 ?String.format(Locale.CHINA, "app/find?page=%d&per_page=%d&is_hot=%d&daily_play=%d&type=%d", page, per_page, 0, 1, 0)
+                :String.format(Locale.CHINA, "app/find?page=%d&per_page=%d&is_hot=%d&daily_play=%d&type=%d", page, per_page, 1, 0, 0);
+    }
+
+    @Override
+    protected Observable<BaseMessage> getApi(ApiService apiService) {
+        return type == 0 ? apiService.playgameDailyOrHotOrTypePlay(page, per_page, 0, 1, 0)
+                : apiService.playgameDailyOrHotOrTypePlay(page, per_page, 1, 0, 0);
+    }
+
+    @Override
+    protected Class<PlayGameEntity> getTClass() {
+            return PlayGameEntity.class;
+    }
+
+    @Override
+    protected int getType() {
+        type = getIntent().getIntExtra("type", 0);
+        TitleBarUtils
+                .getInstance()
+                .setTitle(activity, type==0?"每日必做":"近期最热")
+                .setTitleFinish(activity);
+        return type;
+    }
+}

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

@@ -5,6 +5,7 @@ import android.view.View;
 
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.view.fragment.FgtPlayGame;
 import com.sheep.gamegroup.view.fragment.FgtWelfareCenter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
@@ -35,7 +36,7 @@ public class ActGameCenter extends BaseActivity {
                         Jump2View.getInstance().goMyWelfare(activity);
                     }
                 })
-                .addTabs(activity, act_game_center_vp,"玩转游戏", new FgtWelfareCenter(), "福利中心", new FgtWelfareCenter());
+                .addTabs(activity, act_game_center_vp,"玩转游戏", new FgtPlayGame(), "福利中心", new FgtWelfareCenter());
 
     }
 

+ 163 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/BaseListActivity.java

@@ -0,0 +1,163 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+
+import com.jcodecraeer.xrecyclerview.XRecyclerView;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.model.api.ApiService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.SysAppUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import rx.Observable;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by ljy on 2018/9/3.
+ */
+
+public abstract class BaseListActivity<T> extends BaseActivity {
+
+    @BindView(R.id.title)
+    View title;
+    @BindView(R.id.empty_view)
+    View empty_view;
+    @BindView(R.id.check_net_ll)
+    View check_net_ll;
+    @BindView(R.id.view_list)
+    XRecyclerView view_list;
+    protected Activity activity;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.net_empty_xrecycler;
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        // TODO: add setContentView(...) invocation
+        ButterKnife.bind(this);
+        activity = this;
+        getType();
+        initView();
+        initListener();
+        initData();
+    }
+
+    protected int page = 1;//页数
+    protected int per_page = 10;
+    public void initView() {
+//        title.setVisibility(View.GONE);
+    }
+    private View bottomLine;
+    public void initListener() {
+        view_list.setLoadingListener(new XRecyclerView.LoadingListener() {
+            @Override
+            public void onRefresh() {
+                refreshData();
+            }
+
+            @Override
+            public void onLoadMore() {
+                if(ListUtil.size(list) >= per_page*page){
+                    page += 1;
+                    initData();
+                }else {
+                    view_list.setNoMore(true);
+                }
+            }
+        });
+        bottomLine = ViewUtil.setBottomLine(view_list);
+        view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        view_list.setAdapter(getAdapter());
+
+    }
+
+
+    protected List<T> list = ListUtil.emptyList();
+    public void initData() {
+        final String urlKey = getKey(page, per_page);
+        //先尝试获取缓存数据
+        List<T> newList = DataUtil.getInstance().getCacheList(urlKey, getTClass());
+        loadList(newList);
+        empty_view.setVisibility(View.INVISIBLE);
+        SysAppUtil.checkNet(new Action1<Integer>() {
+            @Override
+            public void call(Integer result) {
+                if(result != 0){//无网络
+                    if(check_net_ll != null)
+                        check_net_ll.setVisibility(View.VISIBLE);
+                } else {
+                    if(check_net_ll != null)
+                        check_net_ll.setVisibility(View.GONE);
+                }
+            }
+        });
+        getApi(SheepApp.getInstance().getNetComponent().getApiService())
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        boolean isNewData = DataUtil.getInstance().isNewData(urlKey);
+                        if(isNewData) {
+                            List<T> newList = baseMessage.getDatas(getTClass());
+                            loadList(newList);
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        notifyDataSetChanged();
+                    }
+                });
+    }
+
+    public void refreshData(){
+        list.clear();
+        view_list.getAdapter().notifyDataSetChanged();
+        page = 1;
+        initData();
+    }
+    private void loadList(List<T> newList){
+        ListUtil.addAll(list, newList);
+        notifyDataSetChanged();
+    }
+    protected void notifyDataSetChanged(){
+        CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
+        bottomLine.setVisibility(list.isEmpty() ? View.INVISIBLE : View.VISIBLE);
+        if(page == 1){
+            view_list.refreshComplete();
+        } else {
+            view_list.loadMoreComplete();
+        }
+        view_list.getAdapter().notifyDataSetChanged();
+    }
+
+    protected abstract RecyclerView.Adapter getAdapter();
+
+    protected abstract String getKey(int page, int per_page);
+
+    protected abstract Observable<BaseMessage> getApi(ApiService apiService);
+
+    protected abstract Class<T> getTClass();
+
+    protected abstract int getType();
+}

+ 50 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/PlayGameItemAdapter.java

@@ -0,0 +1,50 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.content.Context;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.googlecode.protobuf.format.util.TextUtils;
+import com.sheep.gamegroup.model.entity.PlayGameEntity;
+import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+
+import java.util.List;
+
+/**
+ * Created by ljy on 2018/9/3.
+ */
+
+public class PlayGameItemAdapter extends AdbCommonRecycler<PlayGameEntity> implements View.OnClickListener {
+    public PlayGameItemAdapter(Context context, List<PlayGameEntity> list) {
+        super(context, list);
+    }
+
+    @Override
+    public void onClick(View v) {
+
+    }
+
+    @Override
+    public int getViewIdByType(int type) {
+        return R.layout.play_game_vertical_list_item;
+    }
+
+    @Override
+    public void convert(ViewHolder holder, PlayGameEntity playGameEntity) {
+        holder.itemView.setOnClickListener(this);
+        View item_download_welfare_line = holder.getView(R.id.line_tv);
+        View detail_task_tv_center = holder.getView(R.id.detail_task_tv_center);
+        TextView item_name_tv = holder.getView(R.id.item_name_tv);
+        TextView item_date_tv = holder.getView(R.id.item_date_tv);
+
+        ViewUtil.setText(item_name_tv, playGameEntity.getName());
+        ViewUtil.setText(item_date_tv, playGameEntity.getPackage_size()+"M");
+        GlideImageLoader.setImage((ImageView) holder.getView(R.id.item_icon_iv), playGameEntity.getIcon());
+
+        item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+    }
+}

+ 377 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPlayGame.java

@@ -0,0 +1,377 @@
+package com.sheep.gamegroup.view.fragment;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.support.design.widget.TabLayout;
+import android.support.v4.view.ViewPager;
+import android.support.v4.widget.NestedScrollView;
+import android.support.v4.widget.SwipeRefreshLayout;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.bumptech.glide.Glide;
+import com.bumptech.glide.request.RequestOptions;
+import com.kfzs.duanduan.mine.GiftpackListAdapter;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.FindTag;
+import com.sheep.gamegroup.model.entity.PlayGameEntity;
+import com.sheep.gamegroup.model.entity.SlideshowEty;
+import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
+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.base.BaseFragment;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import com.youth.banner.Banner;
+import com.youth.banner.BannerConfig;
+import com.youth.banner.listener.OnBannerListener;
+import com.youth.banner.loader.ImageLoader;
+
+import org.afinal.simplecache.ApiKey;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.OnClick;
+import butterknife.Unbinder;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_TAG;
+
+/**
+ * Created by ljy on 2018/9/3.
+ */
+
+public class FgtPlayGame extends BaseFragment {
+    @BindView(R.id.banner)
+    Banner banner;
+    @BindView(R.id.every_day_more_tv)
+    TextView everyDayMoreTv;
+    @BindView(R.id.every_day_play_list)
+    RecyclerView everyDayPlayList;
+    @BindView(R.id.recent_hot_more_tv)
+    TextView recentHotMoreTv;
+    @BindView(R.id.recent_hoe_list)
+    RecyclerView recentHoeList;
+    @BindView(R.id.tabLayout)
+    TabLayout indicator;
+    @BindView(R.id.viewpager_act_game_details)
+    ViewPager pager;
+    @BindView(R.id.bottom_line_text)
+    TextView bottomLineText;
+    @BindView(R.id.bottom_line)
+    LinearLayout bottomLine;
+    @BindView(R.id.refresh)
+    SwipeRefreshLayout refresh;
+    @BindView(R.id.scrollView)
+    NestedScrollView scrollView;
+    Unbinder unbinder;
+
+    private Activity activity;
+    private List<PlayGameEntity> everyDayPlayListData = new ArrayList<>();
+    private List<PlayGameEntity> hotListData = new ArrayList<>();
+
+    private List<SlideshowEty> slideshowEtyLists = new ArrayList<>();
+    private List<String> slideshowTitleList = new ArrayList<>();
+
+    private List<FindTag> list = ListUtil.emptyList();
+    private GiftpackListAdapter mAdapter;
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_play_game;
+    }
+
+    @Override
+    public void onViewCreated() {
+        activity = getActivity();
+
+        //banner
+        LinearLayout.LayoutParams bannerLayoutParams = (LinearLayout.LayoutParams) banner.getLayoutParams();
+        bannerLayoutParams.height = G.WIDTH * 25 / 72;
+        banner.setLayoutParams(bannerLayoutParams);
+
+        //每日必玩、近期最热
+        LinearLayoutManager playHotManager = new LinearLayoutManager(SheepApp.getInstance(), LinearLayoutManager.HORIZONTAL, false);
+        //每日必玩
+        everyDayPlayList.setHasFixedSize(true);
+        everyDayPlayList.setNestedScrollingEnabled(false);
+        everyDayPlayList.setLayoutManager(playHotManager);
+        everyDayPlayList.setAdapter(new AdbCommonRecycler<PlayGameEntity>(SheepApp.getInstance(), everyDayPlayListData) {
+            @Override
+            public int getViewIdByType(int type) {
+                return R.layout.item_hot_welfare;
+            }
+
+            @Override
+            public void convert(ViewHolder holder, PlayGameEntity welfareCenter) {
+                ImageView item_hot_welfare_iv = holder.getView(R.id.item_hot_welfare_iv);
+                TextView item_hot_welfare_tv = holder.getView(R.id.item_hot_welfare_tv);
+                if(welfareCenter == null){
+                    ViewUtil.setDefaultText(item_hot_welfare_tv);
+                } else {
+                    //TODO 加载数据
+                    ViewUtil.setText(item_hot_welfare_tv, welfareCenter.getName());
+                    GlideImageLoader.setImage(item_hot_welfare_iv, welfareCenter.getIcon());
+                    onClickToPlayGameDetail(holder.itemView, welfareCenter);
+                }
+            }
+        });
+        //近期最热
+        LinearLayoutManager hotManager = new LinearLayoutManager(SheepApp.getInstance(), LinearLayoutManager.HORIZONTAL, false);
+        recentHoeList.setHasFixedSize(true);
+        recentHoeList.setNestedScrollingEnabled(false);
+        recentHoeList.setLayoutManager(hotManager);
+        everyDayPlayList.setAdapter(new AdbCommonRecycler<PlayGameEntity>(SheepApp.getInstance(), hotListData) {
+            @Override
+            public int getViewIdByType(int type) {
+                return R.layout.item_hot_welfare;
+            }
+
+            @Override
+            public void convert(ViewHolder holder, PlayGameEntity welfareCenter) {
+                ImageView item_hot_welfare_iv = holder.getView(R.id.item_hot_welfare_iv);
+                TextView item_hot_welfare_tv = holder.getView(R.id.item_hot_welfare_tv);
+                if(welfareCenter == null){
+                    ViewUtil.setDefaultText(item_hot_welfare_tv);
+                } else {
+                    //TODO 加载数据
+                    ViewUtil.setText(item_hot_welfare_tv, welfareCenter.getName());
+                    GlideImageLoader.setImage(item_hot_welfare_iv, welfareCenter.getIcon());
+                    onClickToPlayGameDetail(holder.itemView, welfareCenter);
+                }
+            }
+        });
+        refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
+            @Override
+            public void onRefresh() {
+                initData();
+            }
+        });
+
+        mAdapter = new GiftpackListAdapter(getFragmentManager(), SheepApp.getInstance());
+
+        //tab
+        initTab();
+    }
+
+    private void onClickToPlayGameDetail(View view, PlayGameEntity playGameEntity){
+        view.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+//                Jump2View.getInstance().goFindInformation(activity, null);
+            }
+        });
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        // TODO: inflate a fragment view
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        unbinder = ButterKnife.bind(this, rootView);
+        return rootView;
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        unbinder.unbind();
+    }
+
+    @Override
+    public void onStart() {
+        super.onStart();
+        //结束轮播
+        banner.startAutoPlay();
+    }
+
+    @Override
+    public void onStop() {
+        super.onStop();
+        //结束轮播
+        banner.stopAutoPlay();
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        initData();
+    }
+
+    private void bindBanner() {
+        //结束轮播
+        banner.stopAutoPlay();
+        banner.setVisibility(View.VISIBLE);
+        //设置图片加载器
+        banner.setImageLoader(new ImageLoader() {
+            @Override
+            public void displayImage(Context context, Object o, ImageView imageView) {
+                if (o instanceof SlideshowEty)
+                    Glide.with(context).load(((SlideshowEty) o).getUrl()).apply(new RequestOptions().dontAnimate()).into(imageView);
+            }
+        })
+                .setDelayTime(4000)
+                .setBannerStyle(BannerConfig.CIRCLE_INDICATOR_TITLE_INSIDE)
+                //设置图片集合
+                .setImages(slideshowEtyLists).setBannerTitles(slideshowTitleList)
+                .setOnBannerListener(new OnBannerListener() {
+                    @Override
+                    public void OnBannerClick(int i) {
+                        CommonUtil.getInstance().clickBanner(activity,i, slideshowEtyLists);
+                    }
+                });
+
+        //banner设置方法全部调用完毕时最后调用
+        banner.start();
+    }
+
+    private void initData(){
+
+        SheepApp.getInstance().getNetComponent().getApiService().slideshow(1)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        notifyDataSetChanged();
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.slideshow);
+                        if (isNewData) {
+                            List<SlideshowEty> slideshowEtyList = baseMessage.getDataList(SlideshowEty.class);
+                            if (ListUtil.isEmpty(slideshowEtyList)) {
+                                banner.setVisibility(View.GONE);
+                            } else {
+                                slideshowEtyLists.clear();
+                                slideshowTitleList.clear();
+                                for (SlideshowEty slideshowEty : slideshowEtyList) {
+                                    slideshowEty.setObjects(CommonUtil.getInstance().getValue(slideshowEty.getExt()));
+                                    slideshowEtyLists.add(slideshowEty);
+                                    slideshowTitleList.add(slideshowEty.getTitle());
+                                }
+                                bindBanner();
+                            }
+                        }
+                        notifyDataSetChanged();
+                    }
+                });
+
+        //每日必玩
+        SheepApp.getInstance().getNetComponent().getApiService().playgameDailyOrHotOrTypePlay(1, 10, 0,1,0)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        List<PlayGameEntity> newList = baseMessage.getDatas(PlayGameEntity.class);
+                        if(everyDayPlayListData.isEmpty() && !ListUtil.isEmpty(newList)) {//有缓存时不会加载,没有缓存时获取到数据会加载
+                            everyDayPlayList.getAdapter().notifyDataSetChanged();
+                            notifyDataSetChanged();
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        notifyDataSetChanged();
+                    }
+                });
+
+        //近期最热
+        SheepApp.getInstance().getNetComponent().getApiService().playgameDailyOrHotOrTypePlay(1, 10, 0,1,0)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        List<PlayGameEntity> newList = baseMessage.getDatas(PlayGameEntity.class);
+                        if(hotListData.isEmpty() && !ListUtil.isEmpty(newList)) {//有缓存时不会加载,没有缓存时获取到数据会加载
+                            recentHoeList.getAdapter().notifyDataSetChanged();
+                            notifyDataSetChanged();
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        notifyDataSetChanged();
+                    }
+                });
+    }
+    private void notifyDataSetChanged() {
+        refresh.setRefreshing(false);
+    }
+
+    /**
+     * tab
+     * @param
+     */
+    private void initTab(){
+        List<FindTag> newList = new ArrayList<>();
+        newList.add(new FindTag(1002, "平台游戏"));
+        newList.add(new FindTag(1003, "小米游戏"));
+        newList.add(new FindTag(1004, "腾讯游戏"));
+        newList.add(new FindTag(1099, "其他"));
+        if (!ListUtil.isEmpty(newList)) {
+            list.clear();
+            ListUtil.addAll(list, newList);
+            for(FindTag findTag:list){
+                mAdapter.add(FgtPlayGameSon.newInstance(findTag.getId()), findTag.getName());
+            }
+            pager.setAdapter(mAdapter);
+            indicator.setupWithViewPager(pager);
+            pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+                @Override
+                public void onPageScrolled(int i, float v, int i1) {
+
+                }
+
+                @Override
+                public void onPageSelected(int i) {
+                    FIND_TAG.onEvent("find_tag_name", ListUtil.hasIndex(list, i - 1) );
+                }
+
+                @Override
+                public void onPageScrollStateChanged(int i) {
+
+                }
+            });
+            CommonUtil.getInstance().reflex(indicator, activity);
+//            pager.setOffscreenPageLimit(mAdapter.getCount());
+            notifyDataSetChanged();
+        }
+    }
+
+    @OnClick({R.id.every_day_more_tv, R.id.recent_hot_more_tv,  R.id.bottom_line})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.every_day_more_tv:
+                Jump2View.getInstance().goEverydayOrCurrentHotGame(activity, 0);
+                break;
+            case R.id.recent_hot_more_tv:
+                Jump2View.getInstance().goEverydayOrCurrentHotGame(activity, 1);
+                break;
+            case R.id.bottom_line://我是有底线的,双击我回到顶部
+                scrollView.fullScroll(NestedScrollView.FOCUS_UP);
+                break;
+        }
+    }
+}

+ 114 - 0
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPlayGameSon.java

@@ -0,0 +1,114 @@
+package com.sheep.gamegroup.view.fragment;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.Welfare;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+import rx.android.schedulers.AndroidSchedulers;
+import rx.schedulers.Schedulers;
+
+/**
+ * Created by ljy on 2018/9/3.
+ */
+
+public class FgtPlayGameSon extends BaseFragment {
+    @BindView(R.id.recyclerview_list)
+    RecyclerView recyclerviewList;
+    Unbinder unbinder;
+
+    private int page = 1;//页数
+    private int per_page = 10;
+    private int type;
+    private Activity activity;
+    private List<Welfare> listData = ListUtil.emptyList();
+
+    public static FgtPlayGameSon newInstance(int type){
+        FgtPlayGameSon fgt = new FgtPlayGameSon();
+        Bundle bundle = new Bundle();
+        bundle.putInt("type", type);
+        fgt.setArguments(bundle);
+        return fgt;
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.recyclerview_layout;
+    }
+
+    @Override
+    public void onViewCreated() {
+        activity = getActivity();
+        LinearLayoutManager downloadLayoutManager = new LinearLayoutManager(SheepApp.getInstance());
+        recyclerviewList.setHasFixedSize(true);
+        recyclerviewList.setNestedScrollingEnabled(false);
+        recyclerviewList.setLayoutManager(downloadLayoutManager);
+        recyclerviewList.setAdapter(new DownloadWelfareAdapter(SheepApp.getInstance(), listData));
+
+        initData();
+    }
+
+    private void initData() {
+        SheepApp.getInstance().getNetComponent().getApiService().getFindList(page, per_page, type)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        ArrayList<Welfare> newList = baseMessage.getDataList(Welfare.class);
+                        listData.clear();
+                        ListUtil.addAll(listData, newList);
+                        recyclerviewList.getAdapter().notifyDataSetChanged();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        listData.clear();
+                        recyclerviewList.getAdapter().notifyDataSetChanged();
+                    }
+                });
+    }
+
+    @Override
+    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+        // TODO: inflate a fragment view
+        View rootView = super.onCreateView(inflater, container, savedInstanceState);
+        unbinder = ButterKnife.bind(this, rootView);
+        Bundle bundle = getArguments();
+        if(bundle != null){
+            type = bundle.getInt("type", 0);
+        }
+        return rootView;
+    }
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        initData();
+    }
+
+    @Override
+    public void onDestroyView() {
+        super.onDestroyView();
+        unbinder.unbind();
+    }
+
+}

+ 77 - 0
app/src/main/res/layout/fgt_play_game.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v4.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/refresh"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white">
+
+    <android.support.v4.widget.NestedScrollView
+        android:id="@+id/scrollView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+            <include layout="@layout/homepage_item_banner" />
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="10dp"
+                android:background="#fff5f5f5" />
+
+            <RelativeLayout style="@style/style_wc_rl">
+
+                <TextView
+                    style="@style/style_wc_line_title"
+                    android:text="每日必玩" />
+                <TextView
+                    android:id="@+id/every_day_more_tv"
+                    style="@style/style_wc_more"
+                    android:text="更多" />
+            </RelativeLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/every_day_play_list"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content" />
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="10dp"
+                android:background="#fff5f5f5" />
+
+            <RelativeLayout style="@style/style_wc_rl">
+
+                <TextView
+                    style="@style/style_wc_line_title"
+                    android:text="近期最热" />
+
+                <TextView
+                    android:id="@+id/recent_hot_more_tv"
+                    style="@style/style_wc_more"
+                    android:text="更多" />
+            </RelativeLayout>
+
+            <android.support.v7.widget.RecyclerView
+                android:id="@+id/recent_hoe_list"
+                android:layout_width="match_parent"
+                android:paddingTop="4dp"
+                android:paddingBottom="4dp"
+                android:layout_height="wrap_content" />
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="10dp"
+                android:background="#fff5f5f5" />
+
+            <!--选项卡-->
+            <include layout="@layout/tablayout_viewpager_layout" />
+
+            <include layout="@layout/find_item_bottom"/>
+        </LinearLayout>
+
+    </android.support.v4.widget.NestedScrollView>
+
+</android.support.v4.widget.SwipeRefreshLayout>

+ 165 - 0
app/src/main/res/layout/play_game_vertical_list_item.xml

@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
+
+    <android.support.constraint.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="12dp"
+        android:layout_marginStart="12dp"
+        android:layout_marginTop="@dimen/content_padding_10">
+
+        <ImageView
+            android:id="@+id/item_icon_iv"
+            android:layout_width="70dp"
+            android:layout_height="70dp"
+            android:src="@drawable/icon_lj"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+
+        <TextView
+            android:id="@+id/end_of_time_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="@dimen/content_padding_4"
+            android:layout_marginStart="@dimen/content_padding_4"
+            android:layout_marginTop="55dp"
+            android:background="@drawable/shape_ash_stroke_white_solid_rectangle"
+            android:gravity="center"
+            android:lines="1"
+            android:textColor="#989898"
+            android:textSize="12sp"
+            android:visibility="gone"
+            app:layout_constraintEnd_toEndOf="@+id/item_icon_iv"
+            app:layout_constraintStart_toStartOf="@+id/item_icon_iv"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <LinearLayout
+            android:id="@+id/item_name_tv_ll"
+            android:layout_width="0dp"
+            android:layout_height="70dp"
+            android:layout_marginStart="@dimen/content_padding"
+            android:orientation="vertical"
+            app:layout_constraintEnd_toStartOf="@+id/task_type_tv"
+            app:layout_constraintStart_toEndOf="@+id/item_icon_iv">
+
+            <TextView
+                android:id="@+id/item_name_tv"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:ellipsize="middle"
+                android:gravity="start"
+                android:maxLines="2"
+                android:text=""
+                android:textColor="#444444"
+                android:textSize="14sp" />
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="3" />
+            <LinearLayout
+                android:id="@+id/item_date_layout"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginEnd="@dimen/content_padding_8"
+                android:layout_marginTop="@dimen/content_padding_2"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/item_date_tv"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:lines="1"
+                    android:text=""
+                    android:textColor="#cc8e8e8e"
+                    android:textSize="10sp" />
+
+                <ImageView
+                    android:id="@+id/item_date_question_img"
+                    android:layout_width="15dp"
+                    android:layout_height="15dp"
+                    android:src="@mipmap/task_game_qustion_icon"
+                    android:visibility="gone"
+                    app:layout_constraintEnd_toEndOf="parent"
+                    app:layout_constraintStart_toEndOf="@+id/item_date_tv" />
+            </LinearLayout>
+
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1" />
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/item_num_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text=""
+                    android:textColor="#cc8e8e8e"
+                    android:textSize="10sp" />
+
+                <TextView
+                    android:id="@+id/item_num_tv1"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/content_padding"
+                    android:text=""
+                    android:textColor="#cc8e8e8e"
+                    android:textSize="10sp"
+                    android:visibility="gone" />
+                <TextView
+                    android:id="@+id/item_num_tv2"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/content_padding"
+                    android:text=""
+                    android:textColor="#cc8e8e8e"
+                    android:textSize="10sp"
+                    android:visibility="gone" />
+                <TextView
+                    android:id="@+id/item_num_tv3"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="@dimen/content_padding"
+                    android:text=""
+                    android:textColor="#cc8e8e8e"
+                    android:textSize="10sp"
+                    android:visibility="gone" />
+            </LinearLayout>
+
+        </LinearLayout>
+
+        <TextView
+            android:id="@+id/detail_task_tv_center"
+            style="@style/style_button_find"
+            android:layout_centerInParent="true"
+            android:text="取消任务"
+            android:visibility="visible"
+            app:layout_constraintBottom_toBottomOf="@+id/item_icon_iv"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+    </android.support.constraint.ConstraintLayout>
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="@dimen/content_padding_10"/>
+    <View
+        android:id="@+id/line_tv"
+        android:layout_width="match_parent"
+        android:layout_height="0.5dp"
+        android:layout_marginEnd="12dp"
+        android:layout_marginStart="12dp"
+        android:background="@color/gray_F0F0F0" />
+</LinearLayout>

+ 7 - 0
app/src/main/res/layout/recyclerview_layout.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/recyclerview_list"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+</android.support.v7.widget.RecyclerView>