Quellcode durchsuchen

Merge remote-tracking branch 'origin/sheep_develop' into sheep_develop

liujiangyao vor 7 Jahren
Ursprung
Commit
88cf55b3de
28 geänderte Dateien mit 947 neuen und 309 gelöschten Zeilen
  1. 2 2
      app/src/main/AndroidManifest.xml
  2. 2 1
      app/src/main/java/com/kfzs/duanduan/fragment/FgtSmallSheep.java
  3. 168 0
      app/src/main/java/com/sheep/gamegroup/model/entity/DownloadWelfare.java
  4. 3 0
      app/src/main/java/com/sheep/gamegroup/model/entity/GiftBag.java
  5. 5 1
      app/src/main/java/com/sheep/gamegroup/model/entity/TaskReleaseEty.java
  6. 88 0
      app/src/main/java/com/sheep/gamegroup/model/entity/VoucherRecord.java
  7. 136 0
      app/src/main/java/com/sheep/gamegroup/model/entity/VoucherUseLog.java
  8. 72 0
      app/src/main/java/com/sheep/gamegroup/model/entity/WelfareLog.java
  9. 4 1
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  10. 2 1
      app/src/main/java/com/sheep/gamegroup/util/TestUtil.java
  11. 1 7
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  12. 35 4
      app/src/main/java/com/sheep/gamegroup/view/activity/ActModifyThird.java
  13. 7 1
      app/src/main/java/com/sheep/gamegroup/view/activity/TaskDetailAct.java
  14. 28 153
      app/src/main/java/com/sheep/gamegroup/view/adapter/DownloadWelfareAdapter.java
  15. 16 3
      app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java
  16. 66 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/VoucherUseLogAdapter.java
  17. 211 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/WelfareAdapter.java
  18. 13 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment.java
  19. 3 3
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtDownloadWelfareList.java
  20. 2 2
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGiftCenter.java
  21. 5 36
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyDownloadWelfareList.java
  22. 2 24
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyGift.java
  23. 15 9
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareCenter.java
  24. 6 37
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareUseRecord.java
  25. 53 21
      app/src/main/res/layout/item_download_welfare.xml
  26. 1 1
      app/src/main/res/layout/net_empty_xrecycler.xml
  27. BIN
      app/src/main/res/mipmap-xxhdpi/tip.png
  28. 1 1
      app/src/main/res/values/strings.xml

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

@@ -98,8 +98,8 @@
         android:persistent="true"
         android:supportsRtl="true"
         android:theme="@style/AppTheme">
-        <meta-data android:name="design_width_in_dp" android:value="360"/>
-        <meta-data android:name="design_height_in_dp" android:value="640"/>
+        <meta-data android:name="design_width_in_dp" android:value="375"/>
+        <meta-data android:name="design_height_in_dp" android:value="667"/>
         <activity
             android:name=".wxapi.WXEntryActivity"
             android:exported="true"

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

@@ -581,7 +581,8 @@ public class FgtSmallSheep extends BaseCompatFragment implements SmallSheepContr
         animation.setDuration(150);
         animation.setRepeatCount(Integer.MAX_VALUE);//根据产品要求,要一直晃动
         animation.setRepeatMode(Animation.REVERSE);
-        imageView.startAnimation(animation);
+        if(imageView != null)
+            imageView.startAnimation(animation);
     }
 
     private void loadUserInfo() {

+ 168 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/DownloadWelfare.java

@@ -0,0 +1,168 @@
+package com.sheep.gamegroup.model.entity;
+
+import android.text.Html;
+
+import com.sheep.gamegroup.util.TimeUtil;
+
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2018/9/4.
+ * realicing@sina.com
+ * {
+ * "name": "tesat",
+ * "icon": "http:\/\/staticcdn.kuaifazs.com\/upload\/static\/201807\/12\/0a\/35\/HOib9G.png",
+ * "online_time": 1531382193,
+ * "deadline": 1533023768,
+ * "gift_ratio": 0,
+ * "consume_amount": 0,
+ * "game_id": "",
+ * "release_id": 734,
+ * "Log": {
+ * "Id": 173,
+ * "UserId": 63096,
+ * "GameId": "",
+ * "Platform": 1,
+ * "Balance": 50,
+ * "TotalAssets": 50,
+ * "UpdateTime": 1536022825,
+ * "CreateTime": 1536022825
+ * }
+ * }
+ */
+public class DownloadWelfare {
+    private String name;
+
+    private String icon;
+
+    private long online_time;
+
+    private long deadline;
+
+    private int gift_ratio;
+
+    private int consume_amount;
+    private String game_id;
+    private int release_id;
+
+    private WelfareLog Log;
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return this.name;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public String getIcon() {
+        return this.icon;
+    }
+
+    public void setOnline_time(int online_time) {
+        this.online_time = online_time;
+    }
+
+    public long getOnline_time() {
+        return this.online_time;
+    }
+
+    public void setDeadline(int deadline) {
+        this.deadline = deadline;
+    }
+
+    public long getDeadline() {
+        return this.deadline;
+    }
+
+    public void setGift_ratio(int gift_ratio) {
+        this.gift_ratio = gift_ratio;
+    }
+
+    public int getGift_ratio() {
+        return this.gift_ratio;
+    }
+
+    public void setConsume_amount(int consume_amount) {
+        this.consume_amount = consume_amount;
+    }
+
+    public int getConsume_amount() {
+        return this.consume_amount;
+    }
+
+    public void setLog(WelfareLog Log) {
+        this.Log = Log;
+    }
+
+    public WelfareLog getLog() {
+        return this.Log;
+    }
+
+    public void setOnline_time(long online_time) {
+        this.online_time = online_time;
+    }
+
+    public void setDeadline(long deadline) {
+        this.deadline = deadline;
+    }
+
+    public String getGame_id() {
+        return game_id;
+    }
+
+    public void setGame_id(String game_id) {
+        this.game_id = game_id;
+    }
+
+    public int getRelease_id() {
+        return release_id;
+    }
+
+    public void setRelease_id(int release_id) {
+        this.release_id = release_id;
+    }
+
+
+
+
+
+
+    /**
+     * 福利内容
+     *
+     * @return
+     */
+    public String getGiftRatioText() {
+        return String.format(Locale.CHINA, "每充500抵%d", gift_ratio * 5);
+    }
+
+    /**
+     * 剩余金额
+     *
+     * @return
+     */
+    public String getBalanceH5() {
+        return String.format(Locale.CHINA, "剩余<font color='#7AD5F6'>%d</font>元", this.Log != null ? this.Log.getBalance() : 0);
+    }
+
+    public String getDateText() {
+        if (deadline < 1000_000) {
+            return "永久";
+        }
+        return String.format(Locale.CHINA, "%s—%s", TimeUtil.TimeStamp2Date(online_time, "yyyy/MM/dd"), TimeUtil.TimeStamp2Date(deadline, "yyyy/MM/dd"));
+    }
+
+    /**
+     * 已使用金额
+     *
+     * @return
+     */
+    public String getUseBalanceText() {
+        return String.format(Locale.CHINA, "已使用%d", this.Log != null ? this.Log.getTotalAssets() - this.Log.getBalance() : 0);
+    }
+}

+ 3 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/GiftBag.java

@@ -170,6 +170,9 @@ public class GiftBag {
     }
 
     public String getDateText() {
+        if(EndTime < 1000_000){
+            return "永久";
+        }
         return String.format(Locale.CHINA, "%s—%s", TimeUtil.TimeStamp2Date(StartTime, "yyyy/MM/dd"), TimeUtil.TimeStamp2Date(EndTime, "yyyy/MM/dd"));
     }
 }

+ 5 - 1
app/src/main/java/com/sheep/gamegroup/model/entity/TaskReleaseEty.java

@@ -327,7 +327,11 @@ public class TaskReleaseEty implements Serializable{
     }
 
     public String getDateText() {
-        return String.format(Locale.CHINA, "%s—%s", TimeUtil.TimeStamp2Date(online_time, "yyyy/MM/dd"), TimeUtil.TimeStamp2Date(NumberFormatUtils.parseLong(deadline), "yyyy/MM/dd"));
+        long endTime = NumberFormatUtils.parseLong(deadline);
+        if(endTime < 1000_000){
+            return "永久";
+        }
+        return String.format(Locale.CHINA, "%s—%s", TimeUtil.TimeStamp2Date(online_time, "yyyy/MM/dd"), TimeUtil.TimeStamp2Date(endTime, "yyyy/MM/dd"));
     }
 
     /**

+ 88 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/VoucherRecord.java

@@ -0,0 +1,88 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/9/4.
+ * realicing@sina.com
+ */
+public class VoucherRecord {
+
+    private int Id;
+
+    private int Type;
+
+    private float Amount;
+
+    private long CreateTime;
+
+    private int UserId;
+
+    private String GameId;
+
+    private float ConsumptionAmount;
+
+    private float SurplusAmount;
+
+    public int getId() {
+        return Id;
+    }
+
+    public void setId(int id) {
+        Id = id;
+    }
+
+    public int getType() {
+        return Type;
+    }
+
+    public void setType(int type) {
+        Type = type;
+    }
+
+    public float getAmount() {
+        return Amount;
+    }
+
+    public void setAmount(float amount) {
+        Amount = amount;
+    }
+
+    public long getCreateTime() {
+        return CreateTime;
+    }
+
+    public void setCreateTime(long createTime) {
+        CreateTime = createTime;
+    }
+
+    public int getUserId() {
+        return UserId;
+    }
+
+    public void setUserId(int userId) {
+        UserId = userId;
+    }
+
+    public String getGameId() {
+        return GameId;
+    }
+
+    public void setGameId(String gameId) {
+        GameId = gameId;
+    }
+
+    public float getConsumptionAmount() {
+        return ConsumptionAmount;
+    }
+
+    public void setConsumptionAmount(float consumptionAmount) {
+        ConsumptionAmount = consumptionAmount;
+    }
+
+    public float getSurplusAmount() {
+        return SurplusAmount;
+    }
+
+    public void setSurplusAmount(float surplusAmount) {
+        SurplusAmount = surplusAmount;
+    }
+}

+ 136 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/VoucherUseLog.java

@@ -0,0 +1,136 @@
+package com.sheep.gamegroup.model.entity;
+
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+import com.sheep.gamegroup.util.TimeUtil;
+
+import java.util.Locale;
+
+/**
+ * Created by realicing on 2018/9/4.
+ * realicing@sina.com
+ * <p>
+ * "name": "tesat",
+ * "icon": "http:\/\/staticcdn.kuaifazs.com\/upload\/static\/201807\/12\/0a\/35\/HOib9G.png",
+ * "online_time": 1531382193,
+ * "deadline": 1533023768,
+ * "gift_ratio": 0,
+ * "consume_amount": 0,
+ * "Log": {
+ * "Id": 450,
+ * "Type": 1,
+ * "Amount": 50,
+ * "CreateTime": 1536022825,
+ * "UserId": 63096,
+ * "GameId": "",
+ * "ConsumptionAmount": 0,
+ * "SurplusAmount": 0
+ * }
+ */
+public class VoucherUseLog {
+    private String name;
+
+    private String icon;
+
+    private int online_time;
+
+    private int deadline;
+
+    private int gift_ratio;
+
+    private int consume_amount;
+
+    private VoucherRecord Log;
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    public int getOnline_time() {
+        return online_time;
+    }
+
+    public void setOnline_time(int online_time) {
+        this.online_time = online_time;
+    }
+
+    public int getDeadline() {
+        return deadline;
+    }
+
+    public void setDeadline(int deadline) {
+        this.deadline = deadline;
+    }
+
+    public int getGift_ratio() {
+        return gift_ratio;
+    }
+
+    public void setGift_ratio(int gift_ratio) {
+        this.gift_ratio = gift_ratio;
+    }
+
+    public int getConsume_amount() {
+        return consume_amount;
+    }
+
+    public void setConsume_amount(int consume_amount) {
+        this.consume_amount = consume_amount;
+    }
+
+    public VoucherRecord getLog() {
+        return Log;
+    }
+
+    public void setLog(VoucherRecord log) {
+        Log = log;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getIcon() {
+        return icon;
+    }
+
+
+
+
+
+
+
+    /**
+     * 福利内容
+     *
+     * @return
+     */
+    public String getGiftRatioText() {
+        return String.format(Locale.CHINA, "每充500抵%d", gift_ratio * 5);
+    }
+
+    /**
+     * 剩余金额
+     *
+     * @return
+     */
+    public String getSurplusText() {
+        return String.format(Locale.CHINA, "剩余<font color='#7AD5F6'>%s</font>元", this.Log != null ? NumberFormatUtils.retainMost2(this.Log.getSurplusAmount()) : "0");
+    }
+
+    public String getDateText() {
+        return this.Log != null ? TimeUtil.TimeStamp2Date(this.Log.getCreateTime(), "yyyy/MM/dd") : "";
+    }
+
+    /**
+     * -金额
+     *
+     * @return
+     */
+    public String getConsumptionAmountText() {
+        return String.format(Locale.CHINA, "-%s", NumberFormatUtils.retainMost2(this.Log != null ? this.Log.getConsumptionAmount() : 0));
+    }
+}

+ 72 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/WelfareLog.java

@@ -0,0 +1,72 @@
+package com.sheep.gamegroup.model.entity;
+
+/**
+ * Created by realicing on 2018/9/4.
+ * realicing@sina.com
+ */
+public class WelfareLog {
+    private int Id;
+
+    private int UserId;
+
+    private String GameId;
+
+    private int Platform;
+
+    private int Balance;
+
+    private int TotalAssets;
+
+    private int UpdateTime;
+
+    private int CreateTime;
+
+    public void setId(int Id){
+        this.Id = Id;
+    }
+    public int getId(){
+        return this.Id;
+    }
+    public void setUserId(int UserId){
+        this.UserId = UserId;
+    }
+    public int getUserId(){
+        return this.UserId;
+    }
+    public void setGameId(String GameId){
+        this.GameId = GameId;
+    }
+    public String getGameId(){
+        return this.GameId;
+    }
+    public void setPlatform(int Platform){
+        this.Platform = Platform;
+    }
+    public int getPlatform(){
+        return this.Platform;
+    }
+    public void setBalance(int Balance){
+        this.Balance = Balance;
+    }
+    public int getBalance(){
+        return this.Balance;
+    }
+    public void setTotalAssets(int TotalAssets){
+        this.TotalAssets = TotalAssets;
+    }
+    public int getTotalAssets(){
+        return this.TotalAssets;
+    }
+    public void setUpdateTime(int UpdateTime){
+        this.UpdateTime = UpdateTime;
+    }
+    public int getUpdateTime(){
+        return this.UpdateTime;
+    }
+    public void setCreateTime(int CreateTime){
+        this.CreateTime = CreateTime;
+    }
+    public int getCreateTime(){
+        return this.CreateTime;
+    }
+}

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

@@ -553,8 +553,8 @@ public class CommonUtil {
         if (tAskEnty != null) {
             if (AutoTaskListUtil.getInstance().addTask(tAskEnty)) {
                 AutoTaskListUtil.getInstance().resetReceiveTaskTime();//重置比对时间  5.1及以上使用
-                AppUsageManager.getInstance().tryOpenLookAppUsageStatsPermisson(true);//尝试打开权限对话框 5.1及以上使用
             }
+            AppUsageManager.getInstance().tryOpenLookAppUsageStatsPermisson(true);//尝试打开权限对话框 5.1及以上使用
             AutoTaskListUtil.getInstance().initTaskList();
         } else {//每次取消任务都重置记录
             AutoTaskListUtil.getInstance().initTaskList();
@@ -1572,6 +1572,9 @@ public class CommonUtil {
 
     //设置无数据显示
     public void updateEmptyView(View empty_view, boolean showEmpty, boolean isNetImg) {
+        if(empty_view == null){
+            return;
+        }
         if (showEmpty) {
             empty_view.setVisibility(View.VISIBLE);
             ImageView empty_view_img = empty_view.findViewById(R.id.empty_view_img);

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

@@ -286,7 +286,8 @@ public class TestUtil {
      * @param activity
      */
     public static void test(final Activity activity) {
-        final String[] items = {"复制token","复制打点数据","审核中心","检查正版","crc32","loading","progress","查看截图","复制imsi","小米游戏","测试可用金额","测试定位信息","测试apk的渠道","幂动科技","游戏搜索",
+        final String[] items = {"复制token","复制打点数据","审核中心","检查正版","crc32","loading","progress","查看截图",
+                "复制imsi","小米游戏","测试可用金额","测试定位信息","测试apk的渠道","幂动科技","游戏搜索",
                 "游戏帐号","游戏代充","尝试开启第三方应用使用情况","测试代理页面","第三方应用使用情况",
                 "开启第三方应用使用情况","h5跳转","新手对话框","md5","空间不足提示框",
                 "显示已经安装应用列表","复制faq地址","复制代理地址","复制世界杯地址","任务游戏列表","世界杯活动","交通银行信用卡测试",

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

@@ -498,13 +498,7 @@ public class ViewUtil {
             @Override
             public void onSetNoMore(View yourFooterView, boolean noMore) {
                 TextView bottom_line_text = yourFooterView.findViewById(R.id.bottom_line_text);
-                bottom_line_text.setText("我是有底线的,点击我回到顶部");
-                yourFooterView.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        view_list.scrollToPosition(0);
-                    }
-                });
+                bottom_line_text.setText("我是有底线的");
             }
         });
         return view;

+ 35 - 4
app/src/main/java/com/sheep/gamegroup/view/activity/ActModifyThird.java

@@ -3,6 +3,8 @@ package com.sheep.gamegroup.view.activity;
 import android.content.Intent;
 import android.support.annotation.StringDef;
 import android.support.v7.widget.AppCompatEditText;
+import android.text.InputFilter;
+import android.text.InputType;
 import android.text.TextUtils;
 import android.view.View;
 import android.widget.TextView;
@@ -13,8 +15,11 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.SelfCountDownTimer;
 import com.sheep.gamegroup.util.StringUtils;
+import com.sheep.gamegroup.util.TestUtil;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -54,11 +59,21 @@ public class ActModifyThird extends BaseActivity {
         return R.layout.act_modify_third;
     }
 
+    private String type;
     @Override
     public void initView() {
         TitleBarUtils.getInstance()
                 .setTitle(this, "验证手机号")
                 .setTitleFinish(this);
+        type = getIntent().getStringExtra("type");
+        if(StringUtils.isMobile(DataUtil.getInstance().getUserMobile())) {
+            modifyThirdMobileEt.setText(DataUtil.getInstance().getUserMobile());
+            modifyThirdMobileEt.setEnabled(false);
+        }
+        if(BuildConfig.DEBUG){
+            modifyThirdMobileEt.setInputType(InputType.TYPE_CLASS_TEXT);
+            modifyThirdMobileEt.setFilters(new InputFilter[]{new InputFilter.LengthFilter(1000)});
+        }
     }
 
     private SelfCountDownTimer selfCountDownTimer;
@@ -117,13 +132,13 @@ public class ActModifyThird extends BaseActivity {
      * @param view
      */
     public void getCaptcha(View view) {
-        modifyThirdCodeBtn.setEnabled(false);
         //检查手机号
         final String mobile = modifyThirdMobileEt.getText().toString().trim();
         if(!StringUtils.isMobile(mobile)){
             G.showToast("请填写正确的手机号!");
             return;
         }
+        modifyThirdCodeBtn.setEnabled(false);
         //提交数据获取验证码
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("genre", genre);
@@ -156,6 +171,10 @@ public class ActModifyThird extends BaseActivity {
         final String captcha = modifyThirdCodeEt.getText().toString().trim();
         if(TextUtils.isEmpty(captcha)){
             G.showToast("请输入验证码");
+            if(BuildConfig.DEBUG && modifyThirdMobileEt.getText().toString().length() > 11){
+                authorization_code = modifyThirdMobileEt.getText().toString().trim();
+                modifyThird();
+            }
             return;
         }
         //提交数据获取验证码
@@ -163,14 +182,15 @@ public class ActModifyThird extends BaseActivity {
         jsonObject.put("captcha", captcha);
         jsonObject.put("genre", genre);
         jsonObject.put("mobile", mMobile);
-        jsonObject.put("step", "first");
+        jsonObject.put("step", "second");
         SheepApp.getInstance().getNetComponent().getApiService().modifyThirdSms(jsonObject)
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
                 .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
                     @Override
                     public void onNext(BaseMessage baseMessage) {
-
+                        authorization_code = baseMessage.getData(String.class);
+                        modifyThird();
                     }
 
                     @Override
@@ -178,7 +198,18 @@ public class ActModifyThird extends BaseActivity {
                         G.showToast(baseMessage);
                     }
                 });
+    }
+    private String authorization_code;//验证手机成功后得到的token
 
+    private void modifyThird() {
+        switch (type){
+            case THIRD_TYPE_QQ:
+                modifyQQ();
+                break;
+            case THIRD_TYPE_WX:
+                modifyWX();
+                break;
+        }
     }
 
     private void modifyQQ() {
@@ -244,7 +275,7 @@ public class ActModifyThird extends BaseActivity {
     private void modifyThird(String platform, String access_token, String openid) {
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("access_token", access_token);
-        jsonObject.put("authorization_code", "");
+        jsonObject.put("authorization_code", authorization_code);
         jsonObject.put("open_id", openid);
         jsonObject.put("platform", platform);
         jsonObject.put("s_from", "sheep");

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

@@ -280,7 +280,13 @@ public class TaskDetailAct extends AbsChooseImageActivity implements TaskDetailC
         setSonVuewShow();
 
         loadOld();
-
+        //用户可主动点击进行开启查看权限
+        taskdetail_explain_layout.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                AppUsageManager.getInstance().openLookAppUsageStatsPermisson();
+            }
+        });
         //自动审核
         if (taskEty.getInspect_type() == 3) {
 

+ 28 - 153
app/src/main/java/com/sheep/gamegroup/view/adapter/DownloadWelfareAdapter.java

@@ -2,54 +2,35 @@ package com.sheep.gamegroup.view.adapter;
 
 import android.app.Activity;
 import android.content.Context;
-import android.text.Html;
+import android.graphics.Color;
 import android.view.View;
 import android.widget.ImageView;
 import android.widget.TextView;
 
-import com.alibaba.fastjson.JSONObject;
-import com.jcodecraeer.xrecyclerview.XRecyclerView;
-import com.kfzs.duanduan.services.DownloadTaskService;
-import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.TaskEty;
-import com.sheep.gamegroup.model.entity.TaskReleaseEty;
-import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.util.DeviceUtil;
+import com.sheep.gamegroup.model.entity.DownloadWelfare;
 import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
 
 import java.util.List;
-import java.util.Locale;
-
-import rx.android.schedulers.AndroidSchedulers;
-import rx.functions.Action1;
-import rx.schedulers.Schedulers;
-
-import static com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp.PUBLIC_TAG_PREFIX_TEXTVIEW_LIST;
 
 /**
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class DownloadWelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
-    private Action1<Integer> action1;
-    public DownloadWelfareAdapter(Context context, List<TaskReleaseEty> list, Action1<Integer> action1) {
+public class DownloadWelfareAdapter extends AdbCommonRecycler<DownloadWelfare>{
+    public DownloadWelfareAdapter(Context context, List<DownloadWelfare> list) {
         super(context, list);
-        this.action1 = action1;
     }
-    public static final int TO_REFRESH = 1;
     @Override
     public int getViewIdByType(int type) {
         return R.layout.item_download_welfare;
     }
 
     @Override
-    public void convert(ViewHolder holder, final TaskReleaseEty item) {
+    public void convert(ViewHolder holder, final DownloadWelfare item) {
         ImageView item_download_welfare_iv = (ImageView)holder.getView(R.id.item_download_welfare_iv);
         ImageView item_download_welfare_iv2 = (ImageView)holder.getView(R.id.item_download_welfare_iv2);
         TextView item_download_welfare_name_tv = (TextView)holder.getView(R.id.item_download_welfare_name_tv);
@@ -58,147 +39,41 @@ public class DownloadWelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
         TextView item_download_welfare_num_tv1 = (TextView)holder.getView(R.id.item_download_welfare_num_tv1);
         TextView item_download_welfare_date_tv = (TextView)holder.getView(R.id.item_download_welfare_date_tv);
         TextView item_download_welfare_btn_bottom = (TextView)holder.getView(R.id.item_download_welfare_btn_bottom);
-        TextView item_download_welfare_btn_top = (TextView)holder.getView(R.id.item_download_welfare_btn_top);
         View item_download_welfare_line = holder.getView(R.id.item_download_welfare_line);
+
+        item_download_welfare_iv2.setVisibility(View.GONE);
+        item_download_welfare_money.setTextColor(Color.parseColor("#ff999999"));
         item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+        item_download_welfare_btn_bottom.setText("去使用");
+        item_download_welfare_btn_bottom.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                if (item.getGame_id() != null) {
+                    ViewUtil.showGamePayAccount((Activity) context, item.getGame_id(), item.getName());
+                }
+
+            }
+        });
         if(item == null){
             ViewUtil.setDefaultText(item_download_welfare_name_tv);
             ViewUtil.setDefaultText(item_download_welfare_num_tv);
             ViewUtil.setDefaultText(item_download_welfare_num_tv1);
             ViewUtil.setDefaultText(item_download_welfare_date_tv);
             ViewUtil.setDefaultText(item_download_welfare_money);
-            item_download_welfare_iv2.setVisibility(View.GONE);
         } else if(context instanceof Activity){
-            final TaskEty itemTask = item.getTask();
-            if(itemTask == null){
-                return;
-            }
-            GlideImageLoader.setGameImage(item_download_welfare_iv, itemTask.getIcon());
+            GlideImageLoader.setGameImage(item_download_welfare_iv, item.getIcon());
             ViewUtil.setText(item_download_welfare_name_tv, item.getName());
-            item_download_welfare_money.setText(Html.fromHtml(String.format(Locale.CHINA, "<font size='1'>¥</font>%s", item.getBonusText())));
+            ViewUtil.setText(item_download_welfare_money, item.getUseBalanceText());
             ViewUtil.setText(item_download_welfare_num_tv, item.getGiftRatioText());
-            ViewUtil.setText(item_download_welfare_num_tv1, item.getLastNumText());
+            ViewUtil.setH5Text(item_download_welfare_num_tv1, item.getBalanceH5());
             ViewUtil.setText(item_download_welfare_date_tv, item.getDateText());
-            item_download_welfare_iv2.setVisibility(item.isTaskFinished()? View.VISIBLE : View.INVISIBLE);
-
-            item_download_welfare_btn_bottom.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + itemTask.getDownload_link());
-            switch (item.getUser_task_status()){//1,已接受任务 2,正在进行中,3完成任务,4放弃任务,5任务失败,6审核失败,7提交审核,8任务已下线,9至少完成了一个任务了
-                case 0:
-                    item_download_welfare_money.setVisibility(View.VISIBLE);
-                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
-                    item_download_welfare_btn_bottom.setEnabled(true);
-                    item_download_welfare_btn_bottom.setText("下载领取");
-                    item_download_welfare_btn_bottom.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View view) {
-                            acceptedTask(item.getId());
-                        }
-                    });
-                    break;
-                case 1:
-                case 2:
-                    item_download_welfare_money.setVisibility(View.VISIBLE);
-                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
-                    item_download_welfare_btn_bottom.setEnabled(true);
-                    item.getDownloadHelper().updateDownloadTaskView((Activity) context, itemTask, item_download_welfare_btn_bottom);
-                    if(item.getDownloadHelper().getDownLoadType() == DownloadTaskService.STATUS_INSTALLED){//已经安装的话
-                        item_download_welfare_btn_bottom.setText("领取奖励");
-                        item_download_welfare_btn_bottom.setOnClickListener(new View.OnClickListener() {
-                            @Override
-                            public void onClick(View view) {
-                                if (itemTask.isGameReservationCantDownload()) {
-                                    CommonUtil.getInstance().reservationGameTask(context, item, new Action1<Integer>() {
-                                        @Override
-                                        public void call(Integer integer) {
-                                            if(action1 != null)
-                                                action1.call(TO_REFRESH);
-                                        }
-                                    });
-                                } else {
-                                    acceptedReceiveAward(item);
-                                }
-                            }
-                        });
-                    }
-                    break;
-                case 3:
-                    item_download_welfare_money.setVisibility(View.INVISIBLE);
-                    item_download_welfare_btn_top.setVisibility(View.VISIBLE);
-                    item.getDownloadHelper().updateDownloadTaskView((Activity) context, itemTask, item_download_welfare_btn_bottom);
-                    if(item.getDownloadHelper().getDownLoadType() == DownloadTaskService.STATUS_INSTALLED) {//已经安装的话
-                        item_download_welfare_btn_bottom.setText("启动");
-                    }
-                    item_download_welfare_btn_top.setText("充值");
-                    item_download_welfare_btn_top.setEnabled(true);
-                    item_download_welfare_btn_top.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View view) {
-                            if (itemTask.getThird_task_id() != null) {
-                                ViewUtil.showGamePayAccount((Activity) context, itemTask.getThird_task_id(), item.getName());
-                            }
-                        }
-                    });
-                    break;
-                default:
-                    item_download_welfare_money.setVisibility(View.VISIBLE);
-                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
-                    item_download_welfare_btn_bottom.setText("已经下线");
-                    item_download_welfare_btn_bottom.setEnabled(false);
-                    break;
-            }
+            holder.itemView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    Jump2View.getInstance().goGameTaskDetailView(context,  item.getRelease_id(), item.getGame_id(),1);
+                }
+            });
         }
     }
 
-    /**
-     * 领取任务
-     */
-    private void acceptedTask(int release_task_id) {
-        JSONObject object = new JSONObject();
-        object.put("device_id", DeviceUtil.getDeviceId(SheepApp.getInstance()));
-        object.put("release_task_id", release_task_id);
-        SheepApp.getInstance()
-                .getNetComponent()
-                .getApiService()
-                .acceptedTask(object)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast(baseMessage);
-                    }
-
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {//领取任务成功
-                        G.showToast(baseMessage);
-                        if(action1 != null)
-                            action1.call(TO_REFRESH);
-                    }
-                });
-    }
-    /**
-     * 领取奖励
-     */
-    private void acceptedReceiveAward(TaskReleaseEty item) {
-        SheepApp.getInstance()
-                .getNetComponent()
-                .getApiService()
-                .receive_award(item.getAccepted_task_id())
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        G.showToast(baseMessage);
-                    }
-
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        //这里领取了奖励,要刷新用户信息
-                        CommonUtil.getInstance().updateUserInfo(null);
-                        if(action1 != null)
-                            action1.call(TO_REFRESH);
-                    }
-                });
-    }
 }

+ 16 - 3
app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java

@@ -15,6 +15,7 @@ import com.sheep.gamegroup.model.entity.GiftBag;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.StringUtils;
 import com.sheep.gamegroup.util.ViewHolder;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
@@ -28,7 +29,7 @@ import rx.android.schedulers.AndroidSchedulers;
 import rx.functions.Action1;
 import rx.schedulers.Schedulers;
 
-import static com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter.TO_REFRESH;
+import static com.sheep.gamegroup.view.adapter.WelfareAdapter.TO_REFRESH;
 
 /**
  * Created by realicing on 2018/8/28.
@@ -50,6 +51,7 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
     @Override
     public void convert(ViewHolder holder, final GiftBagApp item) {
         ImageView item_download_welfare_iv = (ImageView)holder.getView(R.id.item_download_welfare_iv);
+        ImageView item_download_welfare_tip_iv = (ImageView)holder.getView(R.id.item_download_welfare_tip_iv);
         ImageView item_download_welfare_iv2 = (ImageView)holder.getView(R.id.item_download_welfare_iv2);
         TextView item_download_welfare_name_tv = (TextView)holder.getView(R.id.item_download_welfare_name_tv);
         TextView item_download_welfare_money = (TextView)holder.getView(R.id.item_download_welfare_money);
@@ -72,6 +74,7 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
             ViewUtil.setDefaultText(item_download_welfare_num_tv);
             ViewUtil.setDefaultText(item_download_welfare_date_tv);
             item_download_welfare_iv2.setVisibility(View.GONE);
+            item_download_welfare_tip_iv.setVisibility(View.GONE);
         } else if(context instanceof Activity){
             final FindApp itemApp = item.getApp();
             final GiftBag itemGiftBag = item.getGift_bag();
@@ -80,9 +83,10 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
             }
             GlideImageLoader.setGameImage(item_download_welfare_iv, itemApp.getIcon());
             ViewUtil.setText(item_download_welfare_name_tv, itemApp.getName());
-            ViewUtil.setText(item_download_welfare_num_tv, itemGiftBag.getLastNumText());
             ViewUtil.setText(item_download_welfare_date_tv, itemGiftBag.getDateText());
             if(TextUtils.isEmpty(item.getCode())){//没有code,就视为没有领取礼包
+                item_download_welfare_tip_iv.setVisibility(View.GONE);
+                ViewUtil.setText(item_download_welfare_num_tv, itemGiftBag.getLastNumText());
                 item_download_welfare_btn_center.setText("领取");
                 item_download_welfare_btn_center.setOnClickListener(new View.OnClickListener() {
                     @Override
@@ -91,10 +95,19 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
                     }
                 });
             } else {
-                item_download_welfare_btn_center.setText("去使用");
+                item_download_welfare_tip_iv.setVisibility(View.VISIBLE);
+                ViewUtil.setH5Text(item_download_welfare_num_tv, String.format(Locale.CHINA, "兑换码:<font color='#33CCFF'>%s</font>", item.getCode()));
+                item_download_welfare_btn_center.setText("复制");
                 item_download_welfare_btn_center.setOnClickListener(new View.OnClickListener() {
                     @Override
                     public void onClick(View view) {
+                        StringUtils.CopyText(item.getCode());
+                        G.showToast("复制成功");
+                    }
+                });
+                item_download_welfare_tip_iv.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
                         ViewUtil.showMsgDialog(context, new DialogConfig().setTitle("礼包使用说明").setBtnLeftText("我知道了")
                                 .setMsgGravity(Gravity.START)
                                 .setMsg(String.format(Locale.CHINA, "礼包内容:\n%s\n\n使用方式:\n启动游戏---设置---激活兑换", itemGiftBag.getGiftContent())));

+ 66 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/VoucherUseLogAdapter.java

@@ -0,0 +1,66 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.app.Activity;
+import android.content.Context;
+import android.graphics.Color;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.sheep.gamegroup.model.entity.VoucherUseLog;
+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 realicing on 2018/8/28.
+ * realicing@sina.com
+ */
+public class VoucherUseLogAdapter extends AdbCommonRecycler<VoucherUseLog>{
+    public VoucherUseLogAdapter(Context context, List<VoucherUseLog> list) {
+        super(context, list);
+    }
+    @Override
+    public int getViewIdByType(int type) {
+        return R.layout.item_download_welfare;
+    }
+
+    @Override
+    public void convert(ViewHolder holder, final VoucherUseLog item) {
+        ImageView item_download_welfare_iv = (ImageView)holder.getView(R.id.item_download_welfare_iv);
+        ImageView item_download_welfare_iv2 = (ImageView)holder.getView(R.id.item_download_welfare_iv2);
+        TextView item_download_welfare_name_tv = (TextView)holder.getView(R.id.item_download_welfare_name_tv);
+        TextView item_download_welfare_money = (TextView)holder.getView(R.id.item_download_welfare_money);
+        TextView item_download_welfare_money_bottom = (TextView)holder.getView(R.id.item_download_welfare_money_bottom);
+        TextView item_download_welfare_num_tv = (TextView)holder.getView(R.id.item_download_welfare_num_tv);
+        TextView item_download_welfare_num_tv1 = (TextView)holder.getView(R.id.item_download_welfare_num_tv1);
+        TextView item_download_welfare_date_tv = (TextView)holder.getView(R.id.item_download_welfare_date_tv);
+        TextView item_download_welfare_btn_bottom = (TextView)holder.getView(R.id.item_download_welfare_btn_bottom);
+        View item_download_welfare_line = holder.getView(R.id.item_download_welfare_line);
+
+        item_download_welfare_iv2.setVisibility(View.GONE);
+        item_download_welfare_num_tv1.setVisibility(View.GONE);
+        item_download_welfare_btn_bottom.setVisibility(View.GONE);
+        item_download_welfare_money_bottom.setVisibility(View.VISIBLE);
+        item_download_welfare_money.setTextColor(Color.parseColor("#ff999999"));
+        item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+        if(item == null){
+            ViewUtil.setDefaultText(item_download_welfare_name_tv);
+            ViewUtil.setDefaultText(item_download_welfare_num_tv);
+            ViewUtil.setDefaultText(item_download_welfare_num_tv1);
+            ViewUtil.setDefaultText(item_download_welfare_date_tv);
+            ViewUtil.setDefaultText(item_download_welfare_money);
+        } else if(context instanceof Activity){
+            GlideImageLoader.setGameImage(item_download_welfare_iv, item.getIcon());
+            ViewUtil.setText(item_download_welfare_name_tv, item.getName());
+            ViewUtil.setText(item_download_welfare_num_tv, item.getGiftRatioText());
+            ViewUtil.setH5Text(item_download_welfare_money, item.getSurplusText());
+            ViewUtil.setText(item_download_welfare_money_bottom, item.getConsumptionAmountText());
+            ViewUtil.setText(item_download_welfare_date_tv, item.getDateText());
+        }
+    }
+
+}

+ 211 - 0
app/src/main/java/com/sheep/gamegroup/view/adapter/WelfareAdapter.java

@@ -0,0 +1,211 @@
+package com.sheep.gamegroup.view.adapter;
+
+import android.app.Activity;
+import android.content.Context;
+import android.text.Html;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSONObject;
+import com.jcodecraeer.xrecyclerview.XRecyclerView;
+import com.kfzs.duanduan.services.DownloadTaskService;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.TaskEty;
+import com.sheep.gamegroup.model.entity.TaskReleaseEty;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DeviceUtil;
+import com.sheep.gamegroup.util.GlideImageLoader;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ViewHolder;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import java.util.List;
+import java.util.Locale;
+
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+import static com.sheep.gamegroup.view.adapter.TryMakeMoneyAdp.PUBLIC_TAG_PREFIX_TEXTVIEW_LIST;
+
+/**
+ * Created by realicing on 2018/8/28.
+ * realicing@sina.com
+ */
+public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
+    private Action1<Integer> action1;
+    public WelfareAdapter(Context context, List<TaskReleaseEty> list, Action1<Integer> action1) {
+        super(context, list);
+        this.action1 = action1;
+    }
+    public static final int TO_REFRESH = 1;
+    @Override
+    public int getViewIdByType(int type) {
+        return R.layout.item_download_welfare;
+    }
+
+    @Override
+    public void convert(ViewHolder holder, final TaskReleaseEty item) {
+        ImageView item_download_welfare_iv = (ImageView)holder.getView(R.id.item_download_welfare_iv);
+        ImageView item_download_welfare_iv2 = (ImageView)holder.getView(R.id.item_download_welfare_iv2);
+        TextView item_download_welfare_name_tv = (TextView)holder.getView(R.id.item_download_welfare_name_tv);
+        TextView item_download_welfare_money = (TextView)holder.getView(R.id.item_download_welfare_money);
+        TextView item_download_welfare_num_tv = (TextView)holder.getView(R.id.item_download_welfare_num_tv);
+        TextView item_download_welfare_num_tv1 = (TextView)holder.getView(R.id.item_download_welfare_num_tv1);
+        TextView item_download_welfare_date_tv = (TextView)holder.getView(R.id.item_download_welfare_date_tv);
+        TextView item_download_welfare_btn_bottom = (TextView)holder.getView(R.id.item_download_welfare_btn_bottom);
+        TextView item_download_welfare_btn_top = (TextView)holder.getView(R.id.item_download_welfare_btn_top);
+        View item_download_welfare_line = holder.getView(R.id.item_download_welfare_line);
+        item_download_welfare_line.setVisibility(holder.getAdapterPosition() + 1 == getItemCount() ? View.GONE : View.VISIBLE);
+        if(item == null){
+            ViewUtil.setDefaultText(item_download_welfare_name_tv);
+            ViewUtil.setDefaultText(item_download_welfare_num_tv);
+            ViewUtil.setDefaultText(item_download_welfare_num_tv1);
+            ViewUtil.setDefaultText(item_download_welfare_date_tv);
+            ViewUtil.setDefaultText(item_download_welfare_money);
+            item_download_welfare_iv2.setVisibility(View.GONE);
+        } else if(context instanceof Activity){
+            final TaskEty itemTask = item.getTask();
+            if(itemTask == null){
+                return;
+            }
+            GlideImageLoader.setGameImage(item_download_welfare_iv, itemTask.getIcon());
+            ViewUtil.setText(item_download_welfare_name_tv, item.getName());
+            item_download_welfare_money.setText(Html.fromHtml(String.format(Locale.CHINA, "<font size='1'>¥</font>%s", item.getBonusText())));
+            ViewUtil.setText(item_download_welfare_num_tv, item.getGiftRatioText());
+            ViewUtil.setText(item_download_welfare_num_tv1, item.getLastNumText());
+            ViewUtil.setText(item_download_welfare_date_tv, item.getDateText());
+            item_download_welfare_iv2.setVisibility(item.isTaskFinished()? View.VISIBLE : View.INVISIBLE);
+
+            item_download_welfare_btn_bottom.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + itemTask.getDownload_link());
+            switch (item.getUser_task_status()){//1,已接受任务 2,正在进行中,3完成任务,4放弃任务,5任务失败,6审核失败,7提交审核,8任务已下线,9至少完成了一个任务了
+                case 0:
+                    item_download_welfare_money.setVisibility(View.VISIBLE);
+                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
+                    item_download_welfare_btn_bottom.setEnabled(true);
+                    item_download_welfare_btn_bottom.setText("下载领取");
+                    item_download_welfare_btn_bottom.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            acceptedTask(item.getId());
+                        }
+                    });
+                    break;
+                case 1:
+                case 2:
+                    item_download_welfare_money.setVisibility(View.VISIBLE);
+                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
+                    item_download_welfare_btn_bottom.setEnabled(true);
+                    item.getDownloadHelper().updateDownloadTaskView((Activity) context, itemTask, item_download_welfare_btn_bottom);
+                    if(item.getDownloadHelper().getDownLoadType() == DownloadTaskService.STATUS_INSTALLED){//已经安装的话
+                        item_download_welfare_btn_bottom.setText("领取奖励");
+                        item_download_welfare_btn_bottom.setOnClickListener(new View.OnClickListener() {
+                            @Override
+                            public void onClick(View view) {
+                                if (itemTask.isGameReservationCantDownload()) {
+                                    CommonUtil.getInstance().reservationGameTask(context, item, new Action1<Integer>() {
+                                        @Override
+                                        public void call(Integer integer) {
+                                            if(action1 != null)
+                                                action1.call(TO_REFRESH);
+                                        }
+                                    });
+                                } else {
+                                    acceptedReceiveAward(item);
+                                }
+                            }
+                        });
+                    }
+                    break;
+                case 3:
+                    item_download_welfare_money.setVisibility(View.INVISIBLE);
+                    item_download_welfare_btn_top.setVisibility(View.VISIBLE);
+                    item.getDownloadHelper().updateDownloadTaskView((Activity) context, itemTask, item_download_welfare_btn_bottom);
+                    if(item.getDownloadHelper().getDownLoadType() == DownloadTaskService.STATUS_INSTALLED) {//已经安装的话
+                        item_download_welfare_btn_bottom.setText("启动");
+                    }
+                    item_download_welfare_btn_top.setText("充值");
+                    item_download_welfare_btn_top.setEnabled(true);
+                    item_download_welfare_btn_top.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            if (itemTask.getThird_task_id() != null) {
+                                ViewUtil.showGamePayAccount((Activity) context, itemTask.getThird_task_id(), item.getName());
+                            }
+                        }
+                    });
+                    break;
+                default:
+                    item_download_welfare_money.setVisibility(View.VISIBLE);
+                    item_download_welfare_btn_top.setVisibility(View.INVISIBLE);
+                    item_download_welfare_btn_bottom.setText("已经下线");
+                    item_download_welfare_btn_bottom.setEnabled(false);
+                    break;
+            }
+            holder.itemView.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    Jump2View.getInstance().goGameTaskDetailView(context,  item.getId(), itemTask.getThird_task_id(),1);
+                }
+            });
+        }
+    }
+
+    /**
+     * 领取任务
+     */
+    private void acceptedTask(int release_task_id) {
+        JSONObject object = new JSONObject();
+        object.put("device_id", DeviceUtil.getDeviceId(SheepApp.getInstance()));
+        object.put("release_task_id", release_task_id);
+        SheepApp.getInstance()
+                .getNetComponent()
+                .getApiService()
+                .acceptedTask(object)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {//领取任务成功
+                        G.showToast(baseMessage);
+                        if(action1 != null)
+                            action1.call(TO_REFRESH);
+                    }
+                });
+    }
+    /**
+     * 领取奖励
+     */
+    private void acceptedReceiveAward(TaskReleaseEty item) {
+        SheepApp.getInstance()
+                .getNetComponent()
+                .getApiService()
+                .receive_award(item.getAccepted_task_id())
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.mContext) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        //这里领取了奖励,要刷新用户信息
+                        CommonUtil.getInstance().updateUserInfo(null);
+                        if(action1 != null)
+                            action1.call(TO_REFRESH);
+                    }
+                });
+    }
+}

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

@@ -7,6 +7,7 @@ import android.support.v7.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
+import android.widget.TextView;
 
 import com.jcodecraeer.xrecyclerview.XRecyclerView;
 import com.sheep.gamegroup.model.api.ApiService;
@@ -140,8 +141,19 @@ public abstract class BaseListFragment<T> extends BaseFragment {
     }
     protected void notifyDataSetChanged(){
         CommonUtil.getInstance().updateEmptyView(empty_view, list.isEmpty());
-        if(bottomLine != null)
+        if(bottomLine != null) {
             bottomLine.setVisibility(list.isEmpty() ? View.INVISIBLE : View.VISIBLE);
+            final boolean isCanScrollToPosition = page > 1 ;//页数大于一页才显示点击回到顶部
+            TextView bottom_line_text = bottomLine.findViewById(R.id.bottom_line_text);
+            bottom_line_text.setText(isCanScrollToPosition ? "我是有底线的,点击我回到顶部" : "我是有底线的");
+            bottomLine.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    if(isCanScrollToPosition)
+                        view_list.scrollToPosition(0);
+                }
+            });
+        }
         if(page == 1){
             view_list.refreshComplete();
         } else {

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

@@ -9,7 +9,7 @@ import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.TaskReleaseEty;
 import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
+import com.sheep.gamegroup.view.adapter.WelfareAdapter;
 
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
@@ -33,7 +33,7 @@ public class FgtDownloadWelfareList extends BaseListFragment<TaskReleaseEty> imp
     @Override
     public void call(Integer integer) {
         switch (integer){
-            case DownloadWelfareAdapter.TO_REFRESH:
+            case WelfareAdapter.TO_REFRESH:
                 refreshData();
                 break;
         }
@@ -49,7 +49,7 @@ public class FgtDownloadWelfareList extends BaseListFragment<TaskReleaseEty> imp
     }
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new DownloadWelfareAdapter(activity, list, this);
+        return new WelfareAdapter(activity, list, this);
     }
 
     @Override

+ 2 - 2
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGiftCenter.java

@@ -9,7 +9,7 @@ import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
+import com.sheep.gamegroup.view.adapter.WelfareAdapter;
 import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
 
 import org.greenrobot.eventbus.EventBus;
@@ -34,7 +34,7 @@ public class FgtGiftCenter extends BaseListFragment<GiftBagApp> implements Actio
     @Override
     public void call(Integer integer) {
         switch (integer){
-            case DownloadWelfareAdapter.TO_REFRESH:
+            case WelfareAdapter.TO_REFRESH:
                 refreshData();
                 break;
         }

+ 5 - 36
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyDownloadWelfareList.java

@@ -1,56 +1,25 @@
 package com.sheep.gamegroup.view.fragment;
 
-import android.os.Bundle;
-import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
 
-import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.TaskReleaseEty;
-import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.model.entity.DownloadWelfare;
 import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
 
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
-
 import java.util.Locale;
 
 import rx.Observable;
-import rx.functions.Action1;
 
 /**
  * 我的福利--下载福利
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class FgtMyDownloadWelfareList extends BaseListFragment<TaskReleaseEty> implements Action1<Integer> {
-    @Override
-    public void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        EventBus.getDefault().register(this);
-    }
-
-    @Override
-    public void call(Integer integer) {
-        switch (integer){
-            case DownloadWelfareAdapter.TO_REFRESH:
-                refreshData();
-                break;
-        }
-    }
-    @Subscribe
-    public void onEventMainThread(BigEvent event) {
-        CommonUtil.getInstance().setEventResultViewStatus(event, view_list);
-    }
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        EventBus.getDefault().unregister(this);
-    }
+public class FgtMyDownloadWelfareList extends BaseListFragment<DownloadWelfare> {
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new DownloadWelfareAdapter(activity, list, this);
+        return new DownloadWelfareAdapter(activity, list);
     }
 
     @Override
@@ -64,8 +33,8 @@ public class FgtMyDownloadWelfareList extends BaseListFragment<TaskReleaseEty> i
     }
 
     @Override
-    protected Class<TaskReleaseEty> getTClass() {
-        return TaskReleaseEty.class;
+    protected Class<DownloadWelfare> getTClass() {
+        return DownloadWelfare.class;
     }
 
     @Override

+ 2 - 24
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtMyGift.java

@@ -1,19 +1,12 @@
 package com.sheep.gamegroup.view.fragment;
 
-import android.os.Bundle;
-import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
 
-import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
-import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
 import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
-
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
+import com.sheep.gamegroup.view.adapter.WelfareAdapter;
 
 import java.util.Locale;
 
@@ -27,28 +20,13 @@ import rx.functions.Action1;
  */
 public class FgtMyGift extends BaseListFragment<GiftBagApp> implements Action1<Integer> {
     @Override
-    public void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        EventBus.getDefault().register(this);
-    }
-
-    @Override
     public void call(Integer integer) {
         switch (integer){
-            case DownloadWelfareAdapter.TO_REFRESH:
+            case WelfareAdapter.TO_REFRESH:
                 refreshData();
                 break;
         }
     }
-    @Subscribe
-    public void onEventMainThread(BigEvent event) {
-        CommonUtil.getInstance().setEventResultViewStatus(event, view_list);
-    }
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        EventBus.getDefault().unregister(this);
-    }
     @Override
     protected RecyclerView.Adapter getAdapter() {
         return new GiftCenterAdapter(activity, list, this);

+ 15 - 9
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareCenter.java

@@ -26,7 +26,7 @@ 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.gamegroup.view.adapter.DownloadWelfareAdapter;
+import com.sheep.gamegroup.view.adapter.WelfareAdapter;
 import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -80,7 +80,7 @@ public class FgtWelfareCenter extends BaseFragment{
     @Override
     public void onViewCreated() {
         activity = getActivity();
-        Context context = SheepApp.getInstance();
+        final Context context = SheepApp.getInstance();
         //热门福利
         LinearLayoutManager hotLayoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
         wcHotWelfareList.setHasFixedSize(true);
@@ -93,16 +93,22 @@ public class FgtWelfareCenter extends BaseFragment{
             }
 
             @Override
-            public void convert(ViewHolder holder, TaskReleaseEty item) {
+            public void convert(ViewHolder holder, final TaskReleaseEty item) {
                 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(item == null){
+                if(item == null || item.getTask() == null){
                     ViewUtil.setDefaultText(item_hot_welfare_tv);
                 } else {
-                    if(item.getTask() != null)
-                        GlideImageLoader.setGameImage(item_hot_welfare_iv, item.getTask().getIcon());
+                    GlideImageLoader.setGameImage(item_hot_welfare_iv, item.getTask().getIcon());
                     ViewUtil.setText(item_hot_welfare_tv, item.getName());
                 }
+                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);
+                    }
+                });
             }
         });
         //下载福利
@@ -110,11 +116,11 @@ public class FgtWelfareCenter extends BaseFragment{
         wcDownloadWelfareList.setHasFixedSize(true);
         wcDownloadWelfareList.setNestedScrollingEnabled(false);
         wcDownloadWelfareList.setLayoutManager(downloadLayoutManager);
-        wcDownloadWelfareList.setAdapter(new DownloadWelfareAdapter(activity, downloadWelfareList, new Action1<Integer>() {
+        wcDownloadWelfareList.setAdapter(new WelfareAdapter(activity, downloadWelfareList, new Action1<Integer>() {
             @Override
             public void call(Integer integer) {
                 switch (integer){
-                    case DownloadWelfareAdapter.TO_REFRESH:
+                    case WelfareAdapter.TO_REFRESH:
                         refreshDownloadWelfare = true;
                         refreshData();
                         break;
@@ -130,7 +136,7 @@ public class FgtWelfareCenter extends BaseFragment{
             @Override
             public void call(Integer integer) {
                 switch (integer){
-                    case DownloadWelfareAdapter.TO_REFRESH:
+                    case WelfareAdapter.TO_REFRESH:
                         refreshGiftCenter = true;
                         refreshData();
                         break;

+ 6 - 37
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtWelfareUseRecord.java

@@ -1,56 +1,25 @@
 package com.sheep.gamegroup.view.fragment;
 
-import android.os.Bundle;
-import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
 
-import com.kfzs.duanduan.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.TaskReleaseEty;
-import com.sheep.gamegroup.util.CommonUtil;
-import com.sheep.gamegroup.view.adapter.DownloadWelfareAdapter;
-
-import org.greenrobot.eventbus.EventBus;
-import org.greenrobot.eventbus.Subscribe;
+import com.sheep.gamegroup.model.entity.VoucherUseLog;
+import com.sheep.gamegroup.view.adapter.VoucherUseLogAdapter;
 
 import java.util.Locale;
 
 import rx.Observable;
-import rx.functions.Action1;
 
 /**
  * 我的福利--使用记录
  * Created by realicing on 2018/8/28.
  * realicing@sina.com
  */
-public class FgtWelfareUseRecord extends BaseListFragment<TaskReleaseEty> implements Action1<Integer> {
-    @Override
-    public void onCreate(@Nullable Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        EventBus.getDefault().register(this);
-    }
-
-    @Override
-    public void call(Integer integer) {
-        switch (integer){
-            case DownloadWelfareAdapter.TO_REFRESH:
-                refreshData();
-                break;
-        }
-    }
-    @Subscribe
-    public void onEventMainThread(BigEvent event) {
-        CommonUtil.getInstance().setEventResultViewStatus(event, view_list);
-    }
-    @Override
-    public void onDestroy() {
-        super.onDestroy();
-        EventBus.getDefault().unregister(this);
-    }
+public class FgtWelfareUseRecord extends BaseListFragment<VoucherUseLog> {
     @Override
     protected RecyclerView.Adapter getAdapter() {
-        return new DownloadWelfareAdapter(activity, list, this);
+        return new VoucherUseLogAdapter(activity, list);
     }
 
     @Override
@@ -64,8 +33,8 @@ public class FgtWelfareUseRecord extends BaseListFragment<TaskReleaseEty> implem
     }
 
     @Override
-    protected Class<TaskReleaseEty> getTClass() {
-        return TaskReleaseEty.class;
+    protected Class<VoucherUseLog> getTClass() {
+        return VoucherUseLog.class;
     }
 
     @Override

+ 53 - 21
app/src/main/res/layout/item_download_welfare.xml

@@ -25,22 +25,38 @@
             android:layout_width="0dp"
             android:layout_height="62dp"
             android:layout_marginStart="@dimen/content_padding"
-            android:orientation="vertical"
             android:layout_marginTop="16dp"
-            app:layout_constraintTop_toTopOf="parent"
-            app:layout_constraintEnd_toStartOf="@+id/item_download_welfare_btn_top"
-            app:layout_constraintStart_toEndOf="@+id/item_download_welfare_iv">
+            android:orientation="vertical"
+            android:layout_marginEnd="@dimen/find_bt_with"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toEndOf="@+id/item_download_welfare_iv"
+            app:layout_constraintTop_toTopOf="parent">
 
-            <TextView
-                android:id="@+id/item_download_welfare_name_tv"
+            <LinearLayout
                 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" />
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <TextView
+                    android:id="@+id/item_download_welfare_name_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:ellipsize="middle"
+                    android:gravity="start"
+                    android:maxLines="2"
+                    android:text="游戏名称"
+                    android:textColor="#444444"
+                    android:textSize="14sp" />
+
+                <ImageView
+                    android:id="@+id/item_download_welfare_tip_iv"
+                    android:layout_width="25dp"
+                    android:layout_height="25dp"
+                    android:padding="5dp"
+                    android:src="@mipmap/tip"
+                    android:visibility="gone"/>
+            </LinearLayout>
 
             <View
                 android:layout_width="match_parent"
@@ -58,6 +74,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:text="第充500送500"
+                    android:lines="1"
                     android:textColor="#cc8e8e8e"
                     android:textSize="10sp" />
 
@@ -66,7 +83,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_marginStart="@dimen/content_padding"
-                    android:text=""
+                    android:lines="1"
                     android:textColor="#cc8e8e8e"
                     android:textSize="10sp" />
 
@@ -93,47 +110,62 @@
             android:id="@+id/item_download_welfare_iv2"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_marginEnd="14dp"
             android:layout_marginTop="5dp"
-            app:layout_constraintEnd_toStartOf="@+id/item_download_welfare_btn_top"
-            app:layout_constraintTop_toTopOf="parent"
-            android:src="@mipmap/yilingq"/>
+            android:src="@mipmap/yilingq"
+            android:layout_marginEnd="85dp"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
         <TextView
             android:id="@+id/item_download_welfare_money"
             android:layout_width="@dimen/find_bt_with"
             android:layout_height="wrap_content"
+            android:layout_marginTop="21dp"
             android:gravity="center"
             android:text="+10元"
             android:textColor="@color/txt_red"
             android:textSize="15sp"
             app:layout_constraintEnd_toEndOf="parent"
-            android:layout_marginTop="21dp"
             app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/item_download_welfare_money_bottom"
+            android:layout_width="@dimen/find_bt_with"
+            android:layout_height="wrap_content"
+            android:layout_marginBottom="5dp"
+            android:gravity="center"
+            android:text="+10元"
+            android:textColor="@color/txt_red"
+            android:textSize="12sp"
+            android:visibility="gone"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintEnd_toEndOf="parent" />
+
         <TextView
             android:id="@+id/item_download_welfare_btn_top"
             style="@style/style_button_find"
+            android:layout_marginTop="21dp"
             android:text="取消任务"
             android:visibility="invisible"
             app:layout_constraintEnd_toEndOf="parent"
-            android:layout_marginTop="21dp"
             app:layout_constraintTop_toTopOf="parent" />
 
         <TextView
             android:id="@+id/item_download_welfare_btn_center"
             style="@style/style_button_find"
             android:layout_centerInParent="true"
+            android:layout_marginTop="16dp"
             android:text="取消任务"
             android:visibility="gone"
             app:layout_constraintBottom_toBottomOf="@+id/item_download_welfare_iv"
             app:layout_constraintEnd_toEndOf="parent"
-            android:layout_marginTop="16dp"
             app:layout_constraintTop_toTopOf="parent" />
 
         <TextView
             android:id="@+id/item_download_welfare_btn_bottom"
             style="@style/style_button_find"
-            android:text="取消任务"
             android:layout_marginBottom="5dp"
+            android:text="取消任务"
             app:layout_constraintBottom_toBottomOf="@+id/item_download_welfare_iv"
             app:layout_constraintEnd_toEndOf="parent" />
     </android.support.constraint.ConstraintLayout>

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

@@ -2,7 +2,7 @@
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:background="@color/bg_gray">
+    android:background="@color/white">
 
     <include
         android:id="@+id/title"

BIN
app/src/main/res/mipmap-xxhdpi/tip.png


+ 1 - 1
app/src/main/res/values/strings.xml

@@ -47,7 +47,7 @@
     <string name="user_know_four">4、下载成功后,请进入游戏任务—我的游戏,点击充值进行消费;</string>
 
     <string name="supplement_explain">部分机型的用户需要去手机设置里开启允许小绵羊查看应用使用情况权限,方可点击 \"领取奖励\" 完成</string>
-    <string name="supplement_explain_n">补充说明</string>
+    <string name="supplement_explain_n">补充说明(点我开启权限)</string>
     <string name="warm_prompt_n">温馨提示</string>
     <string name="warm_prompt_content">游戏必须是在小绵羊平台下载的游戏,且游戏账号是新注册的,否者任务奖励无法使用。</string>
     <string name="warm_prompt_content_notice">注意:用户若删除游戏后,系统自动检测让其下载安装游戏。</string>