Przeglądaj źródła

游戏、礼包、现金任务弹窗

zengjiebin 7 lat temu
rodzic
commit
a7d5b6b7ff
31 zmienionych plików z 760 dodań i 68 usunięć
  1. 18 0
      app/src/main/AndroidManifest.xml
  2. 6 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  3. 105 0
      app/src/main/java/com/sheep/gamegroup/model/entity/CommendApp.java
  4. 8 1
      app/src/main/java/com/sheep/gamegroup/model/entity/TaskEty.java
  5. 6 3
      app/src/main/java/com/sheep/gamegroup/model/util/LogInterceptor.java
  6. 11 15
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  7. 2 1
      app/src/main/java/com/sheep/gamegroup/util/ConnectAddress.java
  8. 5 1
      app/src/main/java/com/sheep/gamegroup/util/TestUtil.java
  9. 34 38
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  10. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActPlayGameDetail.java
  11. 80 0
      app/src/main/java/com/sheep/gamegroup/view/activity/MiddleSchemeAct.java
  12. 4 1
      app/src/main/java/com/sheep/gamegroup/view/adapter/GiftCenterAdapter.java
  13. 1 0
      app/src/main/java/com/sheep/gamegroup/view/adapter/WelfareAdapter.java
  14. 266 0
      app/src/main/java/com/sheep/gamegroup/view/dialog/DialogGameOrTaskOrGift.java
  15. 1 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtAskGetMoney.java
  16. 6 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java
  17. 2 2
      app/src/main/java/com/sheep/jiuyan/samllsheep/service/DownloadService.java
  18. 1 0
      app/src/main/java/org/afinal/simplecache/ApiKey.java
  19. 9 0
      app/src/main/res/drawable/selector_btn_blue.xml
  20. 9 0
      app/src/main/res/drawable/selector_btn_purple.xml
  21. 9 0
      app/src/main/res/drawable/shape_btn_blue.xml
  22. 9 0
      app/src/main/res/drawable/shape_btn_blue_light.xml
  23. 9 0
      app/src/main/res/drawable/shape_btn_purple.xml
  24. 9 0
      app/src/main/res/drawable/shape_btn_purple_light.xml
  25. 1 1
      app/src/main/res/layout/act_setting.xml
  26. 113 0
      app/src/main/res/layout/dialog_game_or_task_or_gift.xml
  27. 1 1
      app/src/main/res/layout/homepage_item_get_award.xml
  28. 1 1
      app/src/main/res/layout/pop_robduty.xml
  29. 30 0
      app/src/main/res/layout/x_msg_dialog_btn_purple_blue.xml
  30. BIN
      app/src/main/res/mipmap-xxhdpi/change_make_money.webp
  31. 3 0
      app/src/main/res/values/strings.xml

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

@@ -190,6 +190,24 @@
         </activity>
 
         <activity
+            android:name="com.sheep.gamegroup.view.activity.MiddleSchemeAct"
+            android:configChanges="keyboardHidden|screenSize|orientation"
+            android:exported="true"
+            android:hardwareAccelerated="true"
+            android:launchMode="singleTask"
+            android:screenOrientation="portrait"
+            android:theme="@style/AppTheme"
+            android:windowSoftInputMode="adjustPan|stateHidden">
+            <intent-filter android:autoVerify="true">
+                <!--协议部分,随便设置-->
+                <data android:scheme="sheep" android:host="small.kfzs.com"/>
+                <!--下面这几行也必须得设置-->
+                <category android:name="android.intent.category.DEFAULT"/>
+                <action android:name="android.intent.action.VIEW"/>
+                <category android:name="android.intent.category.BROWSABLE"/>
+            </intent-filter>
+        </activity>
+        <activity
             android:name="com.sheep.gamegroup.view.activity.PersonalCenterAct"
             android:screenOrientation="portrait" />
         <activity

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

@@ -88,6 +88,12 @@ public interface ApiService {
 
     /**
      * @return ,
+     * 会长推广显示游戏、现金任务、礼包
+     */
+    @GET("app/find/commend_app")
+    Observable<BaseMessage> getGameOrTaskOrGift(@Query("game_id") String game_id, @Query("order") int order);
+    /**
+     * @return ,
      * 主页抢任务
      */
     @GET("app/release_task/commend_task/")

+ 105 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/CommendApp.java

@@ -0,0 +1,105 @@
+package com.sheep.gamegroup.model.entity;
+
+import com.sheep.gamegroup.util.ListUtil;
+
+import java.util.List;
+
+/**
+ * Created by realicing on 2018/10/16.
+ * realicing@sina.com
+ */
+public class CommendApp {
+
+    private FindApp app;
+
+    private int order;
+
+    private boolean need;
+
+    private TaskReleaseEty release_task;
+
+    private int accepted_task_id;
+
+    private int status;
+
+    private boolean received_voucher;
+
+    private List<GiftBagApp> has_gift_bag;
+
+    public void setApp(FindApp app) {
+        this.app = app;
+    }
+
+    public FindApp getApp() {
+        return this.app;
+    }
+
+    public void setOrder(int order) {
+        this.order = order;
+    }
+
+    public int getOrder() {
+        return this.order;
+    }
+
+    public void setNeed(boolean need) {
+        this.need = need;
+    }
+
+    public boolean getNeed() {
+        return this.need;
+    }
+
+    public void setRelease_task(TaskReleaseEty release_task) {
+        this.release_task = release_task;
+    }
+
+    public TaskReleaseEty getRelease_task() {
+        return this.release_task;
+    }
+
+    public void setAccepted_task_id(int accepted_task_id) {
+        this.accepted_task_id = accepted_task_id;
+    }
+
+    public int getAccepted_task_id() {
+        return this.accepted_task_id;
+    }
+
+    public void setStatus(int status) {
+        this.status = status;
+    }
+
+    public int getStatus() {
+        return this.status;
+    }
+
+    public void setReceived_voucher(boolean received_voucher) {
+        this.received_voucher = received_voucher;
+    }
+
+    public boolean getReceived_voucher() {
+        return this.received_voucher;
+    }
+
+    public void setHas_gift_bag(List<GiftBagApp> has_gift_bag) {
+        this.has_gift_bag = has_gift_bag;
+    }
+
+    public List<GiftBagApp> getHas_gift_bag() {
+        return this.has_gift_bag;
+    }
+    //是否是礼包
+    public boolean isGift() {
+        GiftBagApp item;
+        return (item = ListUtil.getItem(has_gift_bag, 0)) != null && item.getGift_bag() != null;//这里认为礼包列表不为空且第一个礼包不为空就是礼包
+    }
+    //是否是现金任务
+    public boolean isXianJinTask() {
+        return release_task != null && release_task.getTask() != null && release_task.getTask().isXianJinTask();
+    }
+    //是否是游戏
+    public boolean isGame() {
+        return app != null && app.getId() > 0;
+    }
+}

+ 8 - 1
app/src/main/java/com/sheep/gamegroup/model/entity/TaskEty.java

@@ -669,7 +669,13 @@ public class TaskEty implements Serializable, IDownload {
     public boolean isApplet(){
         return task_type == TASK_TYPE_APPLET;
     }
-    //task_type 非连续任务类型 1时间试玩任务 2 信用卡任务 3应用下载 4h5业务 1001畅思 1000连续任务, 1002 1003游戏任务 1002平台游戏,1003 腾讯游戏,1004 小米游戏
+    /**
+     * 是否是现金任务 1008
+     */
+    public boolean isXianJinTask(){
+        return task_type == TASK_TYPE_XIAN_JIN;
+    }
+    //task_type 非连续任务类型 1时间试玩任务 2 信用卡任务 3应用下载 4h5业务 1001畅思 1000连续任务, 1002 1003游戏任务 1002平台游戏,1003 腾讯游戏,1004 小米游戏 1008 现金任务
     public static final int TASK_TYPE_TIME = 1;
     public static final int TASK_TYPE_CREDIT_CARD = 2;
     public static final int TASK_TYPE_APP = 3;
@@ -680,6 +686,7 @@ public class TaskEty implements Serializable, IDownload {
     public static final int TASK_TYPE_GAME_TECENT = 1003;
     public static final int TASK_TYPE_GAME_XIAO_MI = 1004;
     public static final int TASK_TYPE_APPLET = 1007;
+    public static final int TASK_TYPE_XIAN_JIN = 1008;//现金任务
     public static final int TASK_TYPE_GAME_OTHER = 1099;
     //open_mode 连续任务类型
     public static final int OPEN_MODE_TYPE_APP = 1;

+ 6 - 3
app/src/main/java/com/sheep/gamegroup/model/util/LogInterceptor.java

@@ -1,7 +1,8 @@
 package com.sheep.gamegroup.model.util;
 
+import android.text.TextUtils;
+
 import com.sheep.gamegroup.model.api.BaseMessageConverter;
-import com.sheep.gamegroup.util.StringUtils;
 
 import java.io.EOFException;
 import java.io.IOException;
@@ -110,7 +111,8 @@ public class LogInterceptor implements Interceptor {
                         this.logger.log("");
                         if (isPlaintext(buffer)) {
                             String result = buffer.readString(charset);
-                            this.logger.log(isDecrypt ? result+"\n"+StringUtils.parseJson(BaseMessageConverter.decrypt(result)) : StringUtils.parseJson(BaseMessageConverter.decrypt(result)));
+                            String json = BaseMessageConverter.decrypt(result);
+                            this.logger.log(isDecrypt && !TextUtils.equals(result, json) ? "\n" + result + "\n" + json : "\n" + json);
                             this.logger.log("--> END " + request.method() + " (" + requestBody.contentLength() + "-byte body)");
                         } else {
                             this.logger.log("--> END " + request.method() + " (binary " + requestBody.contentLength() + "-byte body omitted)");
@@ -185,7 +187,8 @@ public class LogInterceptor implements Interceptor {
                         if (contentLength != 0L) {
                             this.logger.log("");
                             String result = buffer.clone().readString(charset);
-                            this.logger.log(isDecrypt ? result+"\n"+StringUtils.parseJson(BaseMessageConverter.decrypt(result)) : StringUtils.parseJson(BaseMessageConverter.decrypt(result)));
+                            String json = BaseMessageConverter.decrypt(result);
+                            this.logger.log(isDecrypt && !TextUtils.equals(result, json) ? "\n" + result + "\n" + json : "\n" + json);
                         }
 
                         if (gzippedLength != null) {

+ 11 - 15
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -455,12 +455,12 @@ public class CommonUtil {
     public static final int JUMP_XIAO_MI = 15;//小米游戏列表
     //TODO 这里移动积分兑换的id需要替换
     public static final int JUMP_EXCHANGE_CMCC = 1000025;//移动积分兑换
-    public static final int JUMP_GMAE = 1000026;//游戏
-    public static final int JUMP_FIND_GMAE = 1000029;//游戏
-    public static final int JUMP_WATCH_FOCUS = 1000027;//资讯
-    public static final int JUMP_INFORMATION = 1000028;//看点
-    public static final int JUMP_H5_INNER_FIND = 198;//发现--内部WebView加载H5
-    public static final int JUMP_H5_OUTER_FIND = 199;//发现---外部浏览器加载H5
+    public static final int JUMP_GMAE = 16;//游戏
+    public static final int JUMP_FIND_RECOMMEND = 17;//推荐
+    public static final int JUMP_WATCH_FOCUS = 18;//看点
+    public static final int JUMP_FIND_ACT = 19;//活动
+    public static final int JUMP_FIND_INFORMATION = 20;//资讯
+    public static final int JUMP_FIND_GMAE = 21;//发现中的游戏
     /**
      * 点击主页HomeList跳转
      */
@@ -525,17 +525,13 @@ public class CommonUtil {
             case JUMP_GMAE://游戏详情
                 Jump2View.getInstance().goPlayGameDetail((Activity) context, 0);//TODO 这里差游戏id
                 break;
-            case JUMP_FIND_GMAE://发现中的游戏详情
-                Jump2View.getInstance().goFindGame((Activity) context, 0);//TODO 这里差游戏id
-                break;
-            case JUMP_INFORMATION://webView资讯
+            case JUMP_FIND_RECOMMEND://发现--推荐
+            case JUMP_FIND_ACT://发现--活动
+            case JUMP_FIND_INFORMATION://webView资讯
                 Jump2View.getInstance().goFindInformation((Activity) context, "标题", 0);//TODO 这里差标题和资讯的id
                 break;
-            case JUMP_H5_INNER_FIND://发现--内部WebView加载H5
-                Jump2View.getInstance().goWeb(context, entity.getUrl(), entity.getTitle());
-                break;
-            case JUMP_H5_OUTER_FIND://发现--外部浏览器加载H5
-                Jump2View.getInstance().goWeb(context, entity.getUrl());
+            case JUMP_FIND_GMAE://发现中的游戏详情
+                Jump2View.getInstance().goFindGame((Activity) context, 0);//TODO 这里差游戏id
                 break;
             case JUMP_WATCH_FOCUS://看点
                 Jump2View.getInstance().goWatchFocus((Activity) context, new RouserArticlesEntity());//TODO 这里差看点的id,type, packageName, deepLink, appName

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

@@ -25,7 +25,8 @@ public enum ConnectAddress {
 
         @Override
         public String getAppUrl() {
-            return "http://10.8.240.156:8080/";
+//            return "http://10.8.240.156:8080/";
+            return "http://10.8.220.249:8080/";
         }
         @Override
         public String getName() {

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

@@ -26,6 +26,7 @@ import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.activity.ActSheepApkList;
 import com.sheep.gamegroup.view.activity.ActSheepPngList;
 import com.sheep.gamegroup.view.activity.ActWeb;
+import com.sheep.gamegroup.view.dialog.DialogGameOrTaskOrGift;
 import com.sheep.gamegroup.view.dialog.DialogLoading;
 import com.sheep.gamegroup.view.dialog.DialogNewbieTaskList;
 import com.sheep.gamegroup.view.dialog.DialogProgress;
@@ -199,7 +200,7 @@ public class TestUtil {
      * @param activity
      */
     public static void test(final Activity activity) {
-        final String[] items = {"复制token","复制打点数据","从jenkins下载小绵羊安装包","移动积分兑换","审核中心","检查正版","crc32","loading","progress","查看截图",
+        final String[] items = {"复制token","复制打点数据","从jenkins下载小绵羊安装包","会长推广游戏","移动积分兑换","审核中心","检查正版","crc32","loading","progress","查看截图",
                 "复制imsi","小米游戏","测试可用金额","测试定位信息","测试apk的渠道","幂动科技","游戏搜索",
                 "游戏帐号","游戏代充","尝试开启第三方应用使用情况","测试代理页面","第三方应用使用情况",
                 "开启第三方应用使用情况","h5跳转","新手对话框","md5","空间不足提示框",
@@ -212,6 +213,9 @@ public class TestUtil {
                     @Override
                     public void onClick(DialogInterface dialog, int which) {
                         switch (items[which]) {
+                            case "会长推广游戏":
+                                new DialogGameOrTaskOrGift(activity, "1385").showDialog();
+                                break;
                             case "移动积分兑换":
                                 Jump2View.getInstance().goActExchangeCMCC(activity);
                                 break;

+ 34 - 38
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -260,59 +260,46 @@ public class ViewUtil {
      * 抢任务弹框
      *
      * @param mActivity  当前Activity,
-     * @param viewAnchor 锚
      */
-    public void showRobDutyDialog(final Activity mActivity, View viewAnchor, RobTask robTask) {
-        View view = LayoutInflater.from(mActivity).inflate(R.layout.pop_robduty, null, false);
-        ImageView ivChangeOne = view.findViewById(R.id.iv_change_one);
-        ImageView ivDoNow = view.findViewById(R.id.iv_do_now);
-
-        final ImageView ivIcon = view.findViewById(R.id.iv_duty);
-        ImageView ivClose = view.findViewById(R.id.iv_close);
-        final TextView tvTitel = view.findViewById(R.id.tv_duty_title);
-        final TextView tvDutyMoney = view.findViewById(R.id.tv_robduty_money);
-        ViewUtil.setDefaultText(tvTitel);
-        ViewUtil.setDefaultText(tvDutyMoney);
+    public void showRobDutyDialog(final Activity mActivity, RobTask robTask) {
+        View view = LayoutInflater.from(mActivity).inflate(R.layout.dialog_game_or_task_or_gift, null, false);
+        final AlertDialog mAlertDialog = new AlertDialog.Builder(mActivity, R.style.MyDialogActivityTheme)
+                .setView(view)
+                .create();
+        View dialog_btn_left = view.findViewById(R.id.dialog_btn_left);
+        View dialog_btn_right = view.findViewById(R.id.dialog_btn_right);
+
+        final ImageView dialog_iv = view.findViewById(R.id.dialog_iv);
+        ImageView ivClose = view.findViewById(R.id.dialog_close);
+        final TextView dialog_name_tv = view.findViewById(R.id.dialog_name_tv);
+        final TextView dialog_amount_tv = view.findViewById(R.id.dialog_amount_tv);
+        ViewUtil.setDefaultText(dialog_name_tv);
+        ViewUtil.setDefaultText(dialog_amount_tv);
         if (robTask != null) {
             mRobTask = robTask;
             SpUtils.saveOrder("order", mRobTask.getOrder());
             SheepApp.getInstance().setOrder(mRobTask.getOrder());
-            tvDutyMoney.setText("+" + mRobTask.getM().getBonus() + "元");//设置任务奖励金额
-            tvTitel.setText(mRobTask.getM().getName() + "");//设置任务名字--getTask().getTask_name()
-            GlideImageLoader.setImage(ivIcon, mRobTask.getM().getTask().getIcon());//设置任务图标
+            dialog_amount_tv.setText("+" + mRobTask.getM().getBonus() + "元");//设置任务奖励金额
+            dialog_name_tv.setText(mRobTask.getM().getName() + "");//设置任务名字--getTask().getTask_name()
+            GlideImageLoader.setImage(dialog_iv, mRobTask.getM().getTask().getIcon());//设置任务图标
         } else {
-            mRobTask = getTask(ivIcon, tvTitel, tvDutyMoney);
-        }
-        final PopupWindow popupWindow = new PopupWindow(mActivity);
-        popupWindow.setContentView(view);
-        popupWindow.setAnimationStyle(R.style.Rising);
-        popupWindow.setWidth(ActionBar.LayoutParams.MATCH_PARENT);
-        popupWindow.setHeight(ActionBar.LayoutParams.MATCH_PARENT);
-        popupWindow.setTouchable(true);
-        popupWindow.setFocusable(true);
-        popupWindow.setOutsideTouchable(false);
-        popupWindow.setBackgroundDrawable(new BitmapDrawable());
-        backgroundAlpha(0.5f, mActivity);
-        try {
-            popupWindow.showAtLocation(viewAnchor, Gravity.CENTER, 0, 0);
-        } catch (Exception e) {
-            e.printStackTrace();
+            mRobTask = getTask(dialog_iv, dialog_name_tv, dialog_amount_tv);
         }
-        popupWindow.setOnDismissListener(new PopDismissListener(mActivity));
+
         //更换任务
-        ivChangeOne.setOnClickListener(new View.OnClickListener() {
+        dialog_btn_left.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                mRobTask = getTask(ivIcon, tvTitel, tvDutyMoney);
+                mRobTask = getTask(dialog_iv, dialog_name_tv, dialog_amount_tv);
                 LogUtil.logI("抢任务---" + new Gson().toJson(mRobTask));
 
             }
         });
         //立即去做,跳转到任务详情去
-        ivDoNow.setOnClickListener(new View.OnClickListener() {
+        dialog_btn_right.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
-                popupWindow.dismiss();
+                mAlertDialog.dismiss();
                 if (mRobTask == null) {
                     G.showToast("抢任务失败!");
                     return;
@@ -328,9 +315,14 @@ public class ViewUtil {
         ivClose.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View view) {
-                popupWindow.dismiss();
+                mAlertDialog.dismiss();
             }
         });
+        try {
+            mAlertDialog.show();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
 
     }
 
@@ -1444,7 +1436,6 @@ public class ViewUtil {
         if (textView != null) {
             textView.setText(TextUtils.isEmpty(msg) ? "" : msg);
         }
-
     }
     public static void setText(TextView textView, int integer) {
         if (textView != null) {
@@ -1467,6 +1458,11 @@ public class ViewUtil {
             view.setVisibility(isVisible ? View.VISIBLE : View.GONE);
         }
     }
+    public static void setVisibility2(View view, boolean isVisible) {
+        if (view != null) {
+            view.setVisibility(isVisible ? View.VISIBLE : View.INVISIBLE);
+        }
+    }
 
     public static final String INDENT = "\u3000";//用特殊字符显示空白的缩进字符
 

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

@@ -221,7 +221,7 @@ public class ActPlayGameDetail extends BaseActivity implements Action1<Integer>
 
     @Override
     public void initData() {
-        GameEntity gameEntity = DataUtil.getInstance().getCacheResult(ApiKey.applications(id), GameEntity.class);
+        GameEntity gameEntity = DataUtil.getInstance().getCacheResult(ApiKey.playGameDetail(id), GameEntity.class);
         loadApp(gameEntity);
 
         initDetailFromNet();

+ 80 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/MiddleSchemeAct.java

@@ -0,0 +1,80 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+import android.support.annotation.Nullable;
+
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+/**
+ * Created by realicing on 2018/5/10.
+ * realicing@sina.com
+ */
+public class MiddleSchemeAct extends Activity {
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.find_item_bottom);
+        checkScheme(getIntent());
+    }
+
+    @Override
+    protected void onNewIntent(Intent intent) {
+        super.onNewIntent(intent);
+        checkScheme(intent);
+    }
+
+    private void checkScheme(Intent intent) {
+        String action;
+        if(intent == null || (action = intent.getAction()) == null)
+            return;
+        switch (action){
+            case Intent.ACTION_VIEW:
+                Uri uri = intent.getData();
+                if(uri != null){
+                    // 完整的url信息
+                    String url = uri.toString();
+                    G.showToast(url);
+//                    LogUtil.println("ActMain", "checkScheme","url: " + url);
+//                    // scheme部分
+//                    String scheme = uri.getScheme();
+//                    LogUtil.println("ActMain", "checkScheme","scheme: " + scheme);
+//                    // host部分
+//                    String host = uri.getHost();
+//                    LogUtil.println("ActMain", "checkScheme","host: " + host);
+//                    //port部分
+//                    int port = uri.getPort();
+//                    LogUtil.println("ActMain", "checkScheme","host: " + port);
+//                    // 访问路劲
+//                    String path = uri.getPath();
+//                    LogUtil.println("ActMain", "checkScheme","path: " + path);
+//                    List<String> pathSegments = uri.getPathSegments();
+//                    LogUtil.println("ActMain", "checkScheme","pathSegments:", JSON.toJSONString(pathSegments));
+//                    // Query部分
+//                    String query = uri.getQuery();
+//                    LogUtil.println("ActMain", "checkScheme","query: " + query);
+//                    //获取指定参数值
+//                    String code = uri.getQueryParameter("code");
+//                    LogUtil.println("ActMain", "checkScheme","code: " + code);
+//                    if(TextUtils.equals(code, "0")){
+//                        finish();
+//                    }
+                    /**
+                     * sheep://small.kfzs.com/xmy?game_id=1385&code=976873
+                     * ActMain checkScheme url: sheep://kfzs:8888/xmy?code=976873
+                     * ActMain checkScheme scheme: sheep
+                     * ActMain checkScheme host: kfzs
+                     * ActMain checkScheme host: 8888
+                     * ActMain checkScheme path: /xmy
+                     * ActMain checkScheme pathSegments: ["xmy"]
+                     * ActMain checkScheme query: code=976873
+                     * ActMain checkScheme code: 976873
+                     */
+                }
+                break;
+        }
+    }
+}

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

@@ -34,6 +34,7 @@ import rx.schedulers.Schedulers;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_BAG_COPY_CODE;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_BAG_LOOK_TIP;
 import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_BAG_RECEIVE;
+import static com.sheep.gamegroup.view.adapter.WelfareAdapter.RECEIVE_FAILED;
 import static com.sheep.gamegroup.view.adapter.WelfareAdapter.TO_REFRESH;
 
 /**
@@ -108,7 +109,7 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
                     public void onClick(View view) {
                         GIFT_BAG_COPY_CODE.onEvent("gift_bag_id", item.getGift_bag().getId(), "gift_bag_code", item.getCode());
                         StringUtils.CopyText(item.getCode());
-                        G.showToast("复制成功");
+                        G.showToast(R.string.success_copy_code);
                     }
                 });
                 item_download_welfare_tip_iv.setOnClickListener(new View.OnClickListener() {
@@ -150,6 +151,8 @@ public class GiftCenterAdapter extends AdbCommonRecycler<GiftBagApp> {
 
                             @Override
                             public void onError(BaseMessage baseMessage) {
+                                if(action1 != null)
+                                    action1.call(RECEIVE_FAILED);
                                 G.showToast(baseMessage);
                             }
                         });

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

@@ -45,6 +45,7 @@ public class WelfareAdapter extends AdbCommonRecycler<TaskReleaseEty>{
         this.action1 = action1;
     }
     public static final int TO_REFRESH = 1;
+    public static final int RECEIVE_FAILED = -1;//领取失败
     @Override
     public int getViewIdByType(int type) {
         return R.layout.item_download_welfare;

+ 266 - 0
app/src/main/java/com/sheep/gamegroup/view/dialog/DialogGameOrTaskOrGift.java

@@ -0,0 +1,266 @@
+package com.sheep.gamegroup.view.dialog;
+
+import android.app.Activity;
+import android.support.v7.app.AlertDialog;
+import android.text.TextUtils;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.CashAwarsEntity;
+import com.sheep.gamegroup.model.entity.CommendApp;
+import com.sheep.gamegroup.model.entity.GiftBag;
+import com.sheep.gamegroup.model.entity.GiftBagApp;
+import com.sheep.gamegroup.model.entity.RobTask;
+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.StringUtils;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
+import com.sheep.gamegroup.view.adapter.WelfareAdapter;
+import com.sheep.jiuyan.samllsheep.BuildConfig;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.service.DownloadService;
+import com.sheep.jiuyan.samllsheep.utils.G;
+
+import org.afinal.simplecache.ApiKey;
+
+import rx.android.schedulers.AndroidSchedulers;
+import rx.functions.Action1;
+import rx.schedulers.Schedulers;
+
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.GIFT_BAG_COPY_CODE;
+
+
+public class DialogGameOrTaskOrGift {
+    private Activity activity;
+    private String gameId;
+
+    public DialogGameOrTaskOrGift(Activity activity, String gameId) {
+        this.activity = activity;
+        this.gameId = gameId;
+    }
+// Content View Elements
+
+    private ImageView dialog_iv;
+    private TextView dialog_name_tv;
+    private ImageView dialog_iv_2;
+    private TextView dialog_tip;
+    private View dialog_amount_container;
+    private TextView dialog_amount_tv;
+    private TextView dialog_gift_tv;
+    private TextView dialog_gift_code_tv;
+    private TextView dialog_gift_info_tv;
+    private TextView dialog_btn_left;
+    private TextView dialog_btn_right;
+
+    // End Of Content View Elements
+
+
+    private void resetView() {
+        ViewUtil.setDefaultText(dialog_name_tv);
+        ViewUtil.setDefaultText(dialog_gift_tv);
+        ViewUtil.setVisibility(dialog_amount_tv, false);
+        ViewUtil.setVisibility2(dialog_gift_code_tv, false);
+        ViewUtil.setVisibility2(dialog_gift_info_tv, false);
+        dialog_btn_left.setText("换一个");
+        dialog_btn_right.setText("立即下载");
+    }
+
+    private void loadData() {
+        if (commendApp == null) {
+            resetView();
+        } else {
+            dialog_btn_left.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    initData();
+                }
+            });
+            if (commendApp.isGift()) {
+                final GiftBagApp giftBagApp = commendApp.getHas_gift_bag().get(0);
+                final GiftBag giftBag = giftBagApp.getGift_bag();
+                ViewUtil.setVisibility(dialog_amount_tv, false);
+                ViewUtil.setVisibility2(dialog_gift_code_tv, giftBagApp.isReceived());
+                ViewUtil.setVisibility2(dialog_gift_info_tv, true);
+                GlideImageLoader.setGameImage(dialog_iv, commendApp.getApp().getIcon());
+                ViewUtil.setText(dialog_name_tv, commendApp.getApp().getName());
+                ViewUtil.setText(dialog_gift_tv, giftBag.getGiftName());
+                ViewUtil.setText(dialog_gift_code_tv, giftBagApp.getCode());
+                ViewUtil.setText(dialog_gift_info_tv, giftBag.getUseMethod());
+                if (giftBagApp.isReceived()) {//已经领取礼包
+                    ViewUtil.setText(dialog_btn_right, "复制礼包码");
+                    dialog_btn_right.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            if (TextUtils.isEmpty(giftBagApp.getCode())) {
+                                G.showToast(R.string.error_data);
+                            } else {
+                                GIFT_BAG_COPY_CODE.onEvent("gift_bag_id", giftBag.getId(), "gift_bag_code", giftBagApp.getCode());
+                                StringUtils.CopyText(giftBagApp.getCode());
+                                G.showToast(R.string.success_copy_code);
+                            }
+                        }
+                    });
+                } else {
+                    ViewUtil.setText(dialog_btn_right, "领取礼包");
+                    dialog_btn_right.setOnClickListener(new View.OnClickListener() {
+                        @Override
+                        public void onClick(View view) {
+                            ViewUtil.setText(dialog_btn_right, "正在领取");
+                            GiftCenterAdapter.receiveGiftBag(activity, giftBagApp, new Action1<Integer>() {
+                                @Override
+                                public void call(Integer integer) {
+                                    switch (integer) {
+                                        case WelfareAdapter.TO_REFRESH://刷新界面(注:giftBagApp中已经添加了code)
+                                            loadData();
+                                            break;
+                                        case WelfareAdapter.RECEIVE_FAILED://领取失败
+                                            ViewUtil.setText(dialog_btn_right, "领取礼包");
+                                            break;
+                                    }
+                                }
+                            });
+                        }
+                    });
+                }
+            } else if (commendApp.isXianJinTask()) {
+                ViewUtil.setVisibility(dialog_amount_tv, true);
+                ViewUtil.setVisibility2(dialog_gift_code_tv, false);
+                ViewUtil.setVisibility2(dialog_gift_info_tv, false);
+                GlideImageLoader.setGameImage(dialog_iv, commendApp.getRelease_task().getTask().getIcon());
+                ViewUtil.setText(dialog_name_tv, commendApp.getRelease_task().getName());
+                ViewUtil.setText(dialog_amount_tv, commendApp.getRelease_task().getBonusText() + "元");
+                ViewUtil.setText(dialog_gift_tv, "现金");
+                ViewUtil.setText(dialog_btn_right, "立即赚钱");
+                dialog_btn_right.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        Jump2View.getInstance().goTaskDetailView(activity, commendApp.getRelease_task().getId());
+                    }
+                });
+            } else if (commendApp.isGame()) {
+                ViewUtil.setVisibility(dialog_amount_tv, false);
+                ViewUtil.setVisibility2(dialog_gift_code_tv, false);
+                ViewUtil.setVisibility2(dialog_gift_info_tv, false);
+                GlideImageLoader.setGameImage(dialog_iv, commendApp.getApp().getIcon());
+                ViewUtil.setText(dialog_name_tv, commendApp.getApp().getName());
+                ViewUtil.setText(dialog_gift_tv, commendApp.getApp().getManufacturer());//这里显示的是开发商名字
+                ViewUtil.setText(dialog_btn_right, "立即下载");
+                dialog_btn_right.setOnClickListener(new View.OnClickListener() {
+                    @Override
+                    public void onClick(View view) {
+                        ViewUtil.setText(dialog_btn_right, "正在下载");
+                        DownloadService.sysDownload(activity, commendApp.getApp().getDownload_url(), commendApp.getApp().getName());
+                    }
+                });
+            } else {
+                if (BuildConfig.DEBUG)
+                    G.showToast("不是礼包,不是现金任务,不是游戏,还可能是什么");
+            }
+        }
+
+    }
+
+    private void bindViews(View view) {
+
+        dialog_iv = (ImageView) view.findViewById(R.id.dialog_iv);
+        dialog_name_tv = (TextView) view.findViewById(R.id.dialog_name_tv);
+        dialog_iv_2 = (ImageView) view.findViewById(R.id.dialog_iv_2);
+        dialog_tip = (TextView) view.findViewById(R.id.dialog_tip);
+        dialog_amount_container = view.findViewById(R.id.dialog_amount_container);
+        dialog_amount_tv = (TextView) view.findViewById(R.id.dialog_amount_tv);
+        dialog_gift_tv = (TextView) view.findViewById(R.id.dialog_gift_tv);
+        dialog_gift_code_tv = (TextView) view.findViewById(R.id.dialog_gift_code_tv);
+        dialog_gift_info_tv = (TextView) view.findViewById(R.id.dialog_gift_info_tv);
+        dialog_btn_left = (TextView) view.findViewById(R.id.dialog_btn_left);
+        dialog_btn_right = (TextView) view.findViewById(R.id.dialog_btn_right);
+    }
+
+    private AlertDialog mAlertDialog;
+
+    public AlertDialog showDialog() {
+        View view = View.inflate(activity, R.layout.dialog_game_or_task_or_gift, null);
+        mAlertDialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
+                .setView(view)
+                .create();
+        View.OnClickListener onClickListener = new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mAlertDialog.dismiss();
+            }
+        };
+
+        bindViews(view);
+
+        final View dialog_close = view.findViewById(R.id.dialog_close);
+        dialog_close.setOnClickListener(onClickListener);
+        try {
+            mAlertDialog.show();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        resetView();
+        initData();
+        return mAlertDialog;
+    }
+
+    private CommendApp commendApp;
+    public static final int FIRST_ORDER = 1;//第一次调用会长推广游戏的接口时,传入的order的默认值
+    private void initData() {
+        if (commendApp == null || commendApp.getNeed()) {
+            SheepApp.getInstance().getNetComponent().getApiService().getGameOrTaskOrGift(gameId, commendApp == null ? FIRST_ORDER : commendApp.getOrder())
+                    .subscribeOn(Schedulers.io())
+                    .observeOn(AndroidSchedulers.mainThread())
+                    .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                        @Override
+                        public void onNext(BaseMessage baseMessage) {
+                            commendApp = baseMessage.getData(CommendApp.class);
+                            loadData();
+                        }
+
+                        @Override
+                        public void onError(BaseMessage baseMessage) {
+                            resetView();
+                            G.showToast(baseMessage);
+                        }
+                    });
+        } else {
+            //显示换个频道去赚钱
+            ViewUtil.setVisibility(dialog_iv_2, true);//显示换个频道去赚钱图标
+            ViewUtil.setVisibility(dialog_tip, true);//显示文字【当前现金任务剩余%s元】
+            ViewUtil.setVisibility(dialog_iv, false);//隐藏应用图标
+            ViewUtil.setVisibility(dialog_btn_left, false);//隐藏应用图标
+            ViewUtil.setVisibility(dialog_name_tv, false);//隐藏应用名字
+            ViewUtil.setVisibility2(dialog_amount_container, false);//不显示礼包和现金的父控件
+            ViewUtil.setVisibility2(dialog_gift_code_tv, false);//不显示礼包码
+            ViewUtil.setVisibility2(dialog_gift_info_tv, false);//不显示礼包详情
+            CashAwarsEntity cashAwarsEntity = DataUtil.getInstance().getCacheResult(ApiKey.CAN_RECEIVE_AWARD, CashAwarsEntity.class);
+            ViewUtil.setText(dialog_tip, activity.getString(R.string.cur_xian_jin_amount,  cashAwarsEntity == null ? "0" : NumberFormatUtils.retainMost2(cashAwarsEntity.getCash())));
+            dialog_btn_right.setText("立即去赚钱");
+            dialog_btn_right.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View view) {
+                    mAlertDialog.dismiss();
+                    CommonUtil.getInstance().robTask(new Action1<RobTask>() {
+                        @Override
+                        public void call(RobTask robTask) {
+                            if (robTask != null) {
+                                SheepApp.getInstance().setOrder(robTask.getOrder());
+                                ViewUtil.newInstance().showRobDutyDialog(activity, robTask);
+                            } else {
+                                G.showToast("任务已被抢光!请实时关注任务发布!");
+                            }
+                        }
+                    });
+                }
+            });
+        }
+    }
+}

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

@@ -239,7 +239,7 @@ public class FgtAskGetMoney extends BaseFragment {
                 }
                 QR_COPY.onEvent();
                 StringUtils.CopyText(userEntity.getInvitation_code() + "");
-                G.showToast("复制邀请码成功");
+                G.showToast(R.string.success_copy_inv_code);
                 break;
             case R.id.ask_act_rule:
                 ViewUtil.showMsgDialog(activity, new DialogConfig().setTitle("活动规则").setBtnLeftText("我知道了").setTheme(DialogConfig.THEME_PURPLE)

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

@@ -1041,7 +1041,12 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
                     public void call(RobTask robTask) {
                         if (robTask != null) {
                             SheepApp.getInstance().setOrder(robTask.getOrder());
-                            ViewUtil.newInstance().showRobDutyDialog(activity, getView(), robTask);
+                            try {
+                                ViewUtil.newInstance().showRobDutyDialog(activity, robTask);
+                            } catch (Exception e) {
+                                e.printStackTrace();
+                                G.showToast(e.getMessage());
+                            }
                         } else {
                             G.showToast("任务已被抢光!请实时关注任务发布!");
                         }

+ 2 - 2
app/src/main/java/com/sheep/jiuyan/samllsheep/service/DownloadService.java

@@ -227,8 +227,8 @@ public class DownloadService extends Service {
         }
     }
 
-    private static void sysDownload(final Context context, String link, String taskName) {
-        sysDownload(context, link, taskName, String.format(Locale.CHINA, "下载小绵羊任务【%s】中的app", taskName), taskName + link.hashCode() + ".apk", "系统开始下载apk");
+    public static void sysDownload(final Context context, String link, String taskName) {
+        sysDownload(context, link, taskName, String.format(Locale.CHINA, "小绵羊【%s】中的app下载", taskName), taskName + link.hashCode() + ".apk", "系统开始下载apk");
     }
 
     public static void sysDownload(final Context context, String downloadLink, String title, String description, String fileName, String toast) {

+ 1 - 0
app/src/main/java/org/afinal/simplecache/ApiKey.java

@@ -101,5 +101,6 @@ public class ApiKey {
     public static final String friend_count_and_award = "app/user/friend_count_and_award";
     public static final String MY_ASSETS = "app/user/my_assets";
     public static final String FRIEND_COUNT_AND_AWARD = "app/user/friend_count_and_award";
+    public static final String CAN_RECEIVE_AWARD = "app/user/can_receive_award";
 
 }

+ 9 - 0
app/src/main/res/drawable/selector_btn_blue.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+  <item android:state_enabled="false" android:drawable="@drawable/button_full_normal_gray" />
+  <item android:state_focused="true" android:drawable="@drawable/shape_btn_blue" />
+  <item android:state_checked="true" android:drawable="@drawable/shape_btn_blue"/>
+  <item android:state_selected="true" android:drawable="@drawable/shape_btn_blue"/>
+  <item android:state_pressed="true" android:drawable="@drawable/shape_btn_blue"/>
+  <item android:drawable="@drawable/shape_btn_blue_light"/>
+</selector>

+ 9 - 0
app/src/main/res/drawable/selector_btn_purple.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+  <item android:state_enabled="false" android:drawable="@drawable/button_full_normal_gray" />
+  <item android:state_focused="true" android:drawable="@drawable/shape_btn_purple" />
+  <item android:state_checked="true" android:drawable="@drawable/shape_btn_purple"/>
+  <item android:state_selected="true" android:drawable="@drawable/shape_btn_purple"/>
+  <item android:state_pressed="true" android:drawable="@drawable/shape_btn_purple"/>
+  <item android:drawable="@drawable/shape_btn_purple_light"/>
+</selector>

+ 9 - 0
app/src/main/res/drawable/shape_btn_blue.xml

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

+ 9 - 0
app/src/main/res/drawable/shape_btn_blue_light.xml

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

+ 9 - 0
app/src/main/res/drawable/shape_btn_purple.xml

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

+ 9 - 0
app/src/main/res/drawable/shape_btn_purple_light.xml

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

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

@@ -37,7 +37,7 @@
 
             <TextView
                 style="@style/style_item_label"
-                android:text="新版本介绍" />
+                android:text="新功能介绍" />
 
             <TextView style="@style/style_item_end_next" />
 

+ 113 - 0
app/src/main/res/layout/dialog_game_or_task_or_gift.xml

@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <LinearLayout
+        android:id="@+id/dialog_content"
+        android:layout_width="344dp"
+        android:layout_height="418dp"
+        android:layout_centerInParent="true"
+        android:background="@mipmap/qiangrew_bg"
+        android:gravity="center_horizontal"
+        android:orientation="vertical">
+
+        <ImageView
+            android:id="@+id/dialog_iv"
+            android:layout_width="@dimen/content_padding_65"
+            android:layout_height="@dimen/content_padding_65"
+            android:layout_marginTop="90dp"
+            android:src="@drawable/loading_01" />
+
+        <TextView
+            android:id="@+id/dialog_name_tv"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="10dp"
+            android:text="永恒仙域"
+            android:textColor="#272727"
+            android:textSize="16sp" />
+
+        <ImageView
+            android:id="@+id/dialog_iv_2"
+            android:layout_width="80dp"
+            android:layout_height="@dimen/content_padding_65"
+            android:layout_marginTop="90dp"
+            android:src="@mipmap/change_make_money"
+            android:visibility="gone" />
+
+        <TextView
+            android:id="@+id/dialog_tip"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/cur_xian_jin_amount"
+            android:textColor="#999999"
+            android:textSize="11sp"
+            android:visibility="gone" />
+
+        <LinearLayout
+            android:id="@+id/dialog_amount_container"
+            android:layout_width="match_parent"
+            android:layout_height="45dp"
+            android:gravity="center"
+            android:orientation="horizontal">
+
+            <TextView
+                android:id="@+id/dialog_amount_tv"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="+1元"
+                android:textColor="#ffff2d4b"
+                android:textSize="18sp"
+                android:textStyle="bold" />
+
+            <View
+                android:id="@+id/dialog_line"
+                android:layout_width="5dp"
+                android:layout_height="1dp" />
+
+            <TextView
+                android:id="@+id/dialog_gift_tv"
+                style="@style/style_xian_jin"
+                android:text="现金" />
+        </LinearLayout>
+
+        <TextView
+            android:id="@+id/dialog_gift_code_tv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="50dp"
+            android:layout_marginTop="42dp"
+            android:layout_marginEnd="50dp"
+            android:text="礼包码:1200lhxxx"
+            android:textColor="#fffd2d54"
+            android:textSize="11sp"
+            android:visibility="invisible" />
+
+        <TextView
+            android:id="@+id/dialog_gift_info_tv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="50dp"
+            android:layout_marginTop="5dp"
+            android:layout_marginEnd="50dp"
+            android:text="*领取礼包并复制礼包码后可进入游戏中粘贴礼包码兑换礼包"
+            android:maxLength="2"
+            android:ellipsize="end"
+            android:textColor="#ffffffff"
+            android:textSize="11sp"
+            android:visibility="invisible" />
+
+        <include layout="@layout/x_msg_dialog_btn_purple_blue" />
+    </LinearLayout>
+
+    <ImageView
+        android:id="@+id/dialog_close"
+        android:layout_width="45dp"
+        android:layout_height="45dp"
+        android:layout_below="@+id/dialog_content"
+        android:layout_centerHorizontal="true"
+        android:layout_marginTop="20dp"
+        android:src="@mipmap/close" />
+
+</RelativeLayout>

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

@@ -19,7 +19,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginStart="@dimen/content_padding_30"
-        android:text="你还有329元的奖励未领取"
+        android:text="@string/homepage_award"
         android:textColor="@color/black_333333"
         android:textSize="@dimen/text_size_3"
         app:layout_constraintLeft_toRightOf="@id/homepage_item_get_award_iv"

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

@@ -7,7 +7,7 @@
         android:id="@+id/lay_action"
         android:layout_width="344dp"
         android:layout_height="418dp"
-        android:layout_centerHorizontal="true"
+        android:layout_centerInParent="true"
         android:background="@mipmap/qiangrew_bg">
 
         <ImageView

+ 30 - 0
app/src/main/res/layout/x_msg_dialog_btn_purple_blue.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="40dp"
+    android:layout_marginEnd="40dp"
+    android:orientation="horizontal">
+
+    <TextView
+        android:id="@+id/dialog_btn_left"
+        style="@style/style_button"
+        android:background="@drawable/selector_btn_purple"
+        android:layout_width="0dp"
+        android:layout_weight="5"
+        android:text="换一个" />
+
+    <View
+        android:id="@+id/dialog_btn_center"
+        android:layout_width="0dp"
+        android:layout_height="1dp"
+        android:layout_weight="1" />
+
+    <TextView
+        android:id="@+id/dialog_btn_right"
+        style="@style/style_button"
+        android:background="@drawable/selector_btn_blue"
+        android:layout_width="0dp"
+        android:layout_weight="5"
+        android:text="立即赚钱" />
+</LinearLayout>

BIN
app/src/main/res/mipmap-xxhdpi/change_make_money.webp


Plik diff jest za duży
+ 3 - 0
app/src/main/res/values/strings.xml