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

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

hanjing лет назад: 7
Родитель
Сommit
ce76ca7b6e
81 измененных файлов с 2286 добавлено и 1047 удалено
  1. 0 0
      app/src/developSheeptest/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java
  2. 7 0
      app/src/developSheeptest/java/com/sheep/jiuyan/samllsheep/wxapi/WXPayEntryActivity.java
  3. 12 17
      app/src/main/AndroidManifest.xml
  4. 6 0
      app/src/main/java/com/sheep/gamegroup/model/api/ApiService.java
  5. 1 0
      app/src/main/java/com/sheep/gamegroup/model/entity/DialogConfig.java
  6. 10 0
      app/src/main/java/com/sheep/gamegroup/model/entity/WebParams.java
  7. 1 1
      app/src/main/java/com/sheep/gamegroup/model/util/SheepSubscriber.java
  8. 5 2
      app/src/main/java/com/sheep/gamegroup/module/ad_htxd/model/ArticleAd.java
  9. 23 0
      app/src/main/java/com/sheep/gamegroup/module/find/activity/ActFind.java
  10. 219 0
      app/src/main/java/com/sheep/gamegroup/module/find/fragment/FgtFind2.java
  11. 71 0
      app/src/main/java/com/sheep/gamegroup/module/pay/activity/SheepWXPayEntryActivity.java
  12. 3 62
      app/src/main/java/com/sheep/gamegroup/module/skin/util/SkinUtil.java
  13. 19 0
      app/src/main/java/com/sheep/gamegroup/util/ApiJSONUtil.java
  14. 18 0
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  15. 3 13
      app/src/main/java/com/sheep/gamegroup/util/Jump2View.java
  16. 10 1
      app/src/main/java/com/sheep/gamegroup/util/ListUtil.java
  17. 25 0
      app/src/main/java/com/sheep/gamegroup/util/NetUtil.java
  18. 79 80
      app/src/main/java/com/sheep/gamegroup/util/SysAppUtil.java
  19. 11 8
      app/src/main/java/com/sheep/gamegroup/util/TestUtil.java
  20. 127 16
      app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java
  21. 18 0
      app/src/main/java/com/sheep/gamegroup/util/js/BaseActWeb.java
  22. 18 7
      app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java
  23. 5 20
      app/src/main/java/com/sheep/gamegroup/view/activity/ActAudit.java
  24. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActPublishArticle.java
  25. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActSignCard.java
  26. 10 0
      app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java
  27. 18 31
      app/src/main/java/com/sheep/gamegroup/view/activity/ActXiaomiGame.java
  28. 327 0
      app/src/main/java/com/sheep/gamegroup/view/activity/NewYearActMyMoney.java
  29. 165 136
      app/src/main/java/com/sheep/gamegroup/view/activity/RechargeAct.java
  30. 2 0
      app/src/main/java/com/sheep/gamegroup/view/activity/RechargeResultAct.java
  31. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/SignCardAct.java
  32. 0 242
      app/src/main/java/com/sheep/gamegroup/view/activity/SignRechargeAct.java
  33. 155 185
      app/src/main/java/com/sheep/gamegroup/view/adapter/TryMakeMoneyAdp.java
  34. 0 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtArticleComment.java
  35. 5 2
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtFind.java
  36. 23 20
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtFindChild.java
  37. 32 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPersonalCenter.java
  38. 32 38
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java
  39. 4 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java
  40. 11 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java
  41. 6 27
      app/src/main/java/com/sheep/jiuyan/samllsheep/utils/TitleBarUtils.java
  42. 11 0
      app/src/main/res/color/new_year_selector_color_tab2.xml
  43. BIN
      app/src/main/res/drawable-xxhdpi/icon.png
  44. BIN
      app/src/main/res/drawable-xxhdpi/icon_new_year.png
  45. BIN
      app/src/main/res/drawable-xxhdpi/new_year_yaoqingzq_bg_3.png
  46. BIN
      app/src/main/res/drawable-xxhdpi/new_year_yaoqingzq_bg_3.webp
  47. 7 0
      app/src/main/res/drawable/button_full_upgrade_click.xml
  48. 7 0
      app/src/main/res/drawable/button_full_upgrade_normal.xml
  49. 9 0
      app/src/main/res/drawable/selector_button_full_upgrade.xml
  50. 100 93
      app/src/main/res/layout/act_audit_layout.xml
  51. 5 0
      app/src/main/res/layout/common_container_nofit.xml
  52. 53 0
      app/src/main/res/layout/dialog_parent_update.xml
  53. 101 0
      app/src/main/res/layout/fgt_find2.xml
  54. 40 19
      app/src/main/res/layout/fgt_personalcenter_item_center_one.xml
  55. 2 4
      app/src/main/res/layout/fragment_sign_in.xml
  56. 3 3
      app/src/main/res/layout/fragment_sign_up.xml
  57. 3 1
      app/src/main/res/layout/homepage_act_layout.xml
  58. 360 0
      app/src/main/res/layout/new_year_act_my_money.xml
  59. 31 0
      app/src/main/res/layout/new_year_tab_item.xml
  60. 19 0
      app/src/main/res/layout/pay_result.xml
  61. 4 10
      app/src/main/res/layout/recharge_act_layout.xml
  62. 2 1
      app/src/main/res/layout/try_makemoney_item_recommend.xml
  63. 0 1
      app/src/main/res/layout/view_float_title_card.xml
  64. BIN
      app/src/main/res/mipmap-xhdpi/icon.png
  65. BIN
      app/src/main/res/mipmap-xhdpi/icon_new_year.png
  66. BIN
      app/src/main/res/mipmap-xxhdpi/bg_upgrade_app.png
  67. BIN
      app/src/main/res/mipmap-xxhdpi/ic_my_pet.webp
  68. BIN
      app/src/main/res/mipmap-xxhdpi/new_year_home_blue_bg_hb.png
  69. 1 1
      app/src/main/res/values/str_public_strings.xml
  70. 4 1
      app/src/main/res/values/strings.xml
  71. 6 0
      app/src/main/res/values/styles.xml
  72. 7 0
      app/src/sheep/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java
  73. 7 0
      app/src/sheep/java/com/sheep/jiuyan/samllsheep/wxapi/WXPayEntryActivity.java
  74. 7 0
      app/src/sheeptestjiguang/java/com/sheep/jiuyan/samllsheep/test/wxapi/WXEntryActivity.java
  75. 7 0
      app/src/sheeptestjiguang/java/com/sheep/jiuyan/samllsheep/test/wxapi/WXPayEntryActivity.java
  76. 6 0
      skin_newYear/src/main/res/drawable/shape_gradient_main.xml
  77. BIN
      skin_newYear/src/main/res/mipmap-xxhdpi/audit_top_bg.png
  78. BIN
      skin_newYear/src/main/res/mipmap-xxhdpi/ic_coupons.png
  79. BIN
      skin_newYear/src/main/res/mipmap-xxhdpi/ic_game_recharge.png
  80. BIN
      skin_newYear/src/main/res/mipmap-xxhdpi/ic_long_mao.png
  81. BIN
      skin_newYear/src/main/res/mipmap-xxhdpi/ic_vip.png

app/src/main/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java → app/src/developSheeptest/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java


+ 7 - 0
app/src/developSheeptest/java/com/sheep/jiuyan/samllsheep/wxapi/WXPayEntryActivity.java

@@ -0,0 +1,7 @@
+package com.sheep.jiuyan.samllsheep.wxapi;
+
+
+import com.sheep.gamegroup.module.pay.activity.SheepWXPayEntryActivity;
+
+public class WXPayEntryActivity extends SheepWXPayEntryActivity {
+}

+ 12 - 17
app/src/main/AndroidManifest.xml

@@ -126,6 +126,10 @@
             android:exported="true"
             android:exported="true"
             android:launchMode="singleTop" />
             android:launchMode="singleTop" />
         <activity
         <activity
+            android:name=".wxapi.WXPayEntryActivity"
+            android:exported="true"
+            android:launchMode="singleTop"/>
+        <activity
             android:name="com.sheep.gamegroup.view.activity.WebviewAct"
             android:name="com.sheep.gamegroup.view.activity.WebviewAct"
             android:theme="@style/AppActionTheme"
             android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
@@ -191,18 +195,6 @@
                 <category android:name="android.intent.category.LAUNCHER" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
             </intent-filter>
         </activity>
         </activity>
-        <activity-alias
-            android:name=".NewYearSplashAct"
-            android:enabled="false"
-            android:icon="@mipmap/icon_new_year"
-            android:label="@string/app_name"
-            android:targetActivity="com.sheep.gamegroup.view.activity.SplashAct">
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity-alias>
         <activity
         <activity
             android:name="com.sheep.gamegroup.view.activity.MiddleSchemeAct"
             android:name="com.sheep.gamegroup.view.activity.MiddleSchemeAct"
             android:configChanges="keyboardHidden|screenSize|orientation"
             android:configChanges="keyboardHidden|screenSize|orientation"
@@ -433,6 +425,10 @@
             android:theme="@style/AppActionTheme"
             android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
         <activity
         <activity
+            android:name="com.sheep.gamegroup.view.activity.NewYearActMyMoney"
+            android:theme="@style/AppActionTheme"
+            android:screenOrientation="portrait" />
+        <activity
             android:name="com.sheep.gamegroup.view.activity.FeedbackAct"
             android:name="com.sheep.gamegroup.view.activity.FeedbackAct"
             android:theme="@style/AppActionTheme"
             android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
@@ -457,11 +453,6 @@
             android:theme="@style/AppActionTheme"
             android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
         <activity
         <activity
-            android:name="com.sheep.gamegroup.view.activity.SignRechargeAct"
-            android:theme="@style/AppActionTheme"
-            android:exported="true"
-            android:screenOrientation="portrait" />
-        <activity
             android:name="com.sheep.gamegroup.view.activity.ActUserNoviceGuidance"
             android:name="com.sheep.gamegroup.view.activity.ActUserNoviceGuidance"
             android:theme="@style/AppActionTheme"
             android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
@@ -971,6 +962,10 @@
             android:name="com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail"
             android:name="com.sheep.gamegroup.module.game.activity.ActGameGroupOrGameDetail"
             android:theme="@style/AppActionTheme"
             android:theme="@style/AppActionTheme"
             android:screenOrientation="portrait" />
             android:screenOrientation="portrait" />
+        <activity
+            android:name="com.sheep.gamegroup.module.find.activity.ActFind"
+            android:theme="@style/AppActionTheme"
+            android:screenOrientation="portrait" />
     </application>
     </application>
 
 
 </manifest>
 </manifest>

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

@@ -1722,6 +1722,12 @@ public interface ApiService {
      */
      */
     @POST("app/mission/newspring/execute")
     @POST("app/mission/newspring/execute")
     Observable<BaseMessage> missionExecute(@Body JSONObject jsonObject);
     Observable<BaseMessage> missionExecute(@Body JSONObject jsonObject);
+    /**
+     * 执行活动任务
+     * act 任务标识
+     */
+    @GET("app/mission/newspring/getinfo")
+    Observable<BaseMessage> missionGetinfo(@Query("act") int act, @Query("state") int state);
 
 
 //---------------------------end 小绵羊3.4.10新增 -- app/mission 春节活动-------------------------------------
 //---------------------------end 小绵羊3.4.10新增 -- app/mission 春节活动-------------------------------------
 }
 }

+ 1 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/DialogConfig.java

@@ -183,6 +183,7 @@ public class DialogConfig {
     }
     }
     public static final int THEME_DEFAULT = 0;
     public static final int THEME_DEFAULT = 0;
     public static final int THEME_PURPLE = 1;
     public static final int THEME_PURPLE = 1;
+    public static final int THEME_UPGRADE = 2;
     private int theme = THEME_DEFAULT;
     private int theme = THEME_DEFAULT;
     @IntDef({THEME_DEFAULT, THEME_PURPLE})
     @IntDef({THEME_DEFAULT, THEME_PURPLE})
     @Retention(RetentionPolicy.SOURCE)
     @Retention(RetentionPolicy.SOURCE)

+ 10 - 0
app/src/main/java/com/sheep/gamegroup/model/entity/WebParams.java

@@ -17,6 +17,7 @@ public class WebParams implements Serializable {
     private boolean needJsInteract = true;
     private boolean needJsInteract = true;
     private boolean showTitle = true;
     private boolean showTitle = true;
     private boolean forResult = false;
     private boolean forResult = false;
+    private boolean refreshClick = true;
     private int action;
     private int action;
     private String tokenKey = "authorization";
     private String tokenKey = "authorization";
     private String invitationCodeKey = "invitation_code";
     private String invitationCodeKey = "invitation_code";
@@ -50,6 +51,15 @@ public class WebParams implements Serializable {
         return forResult;
         return forResult;
     }
     }
 
 
+    public boolean isRefreshClick() {
+        return refreshClick;
+    }
+
+    public WebParams setRefreshClick(boolean refreshClick) {
+        this.refreshClick = refreshClick;
+        return this;
+    }
+
     public WebParams setForResult(boolean forResult) {
     public WebParams setForResult(boolean forResult) {
         this.forResult = forResult;
         this.forResult = forResult;
         return this;
         return this;

+ 1 - 1
app/src/main/java/com/sheep/gamegroup/model/util/SheepSubscriber.java

@@ -34,7 +34,7 @@ public abstract class SheepSubscriber<T> implements Observer<T> {
 
 
     @Override
     @Override
     public void onSubscribe(Disposable d) {
     public void onSubscribe(Disposable d) {
-        if (!NetUtil.isConnected(context)) {
+        if (!NetUtil.isConnected(context) || NetUtil.isWifiProxy()) {
             if (SheepApp.getInstance().getCurrentActivity() != null) {
             if (SheepApp.getInstance().getCurrentActivity() != null) {
                 SheepApp.getInstance().getCurrentActivity().runOnUiThread(this::showNoNetView);
                 SheepApp.getInstance().getCurrentActivity().runOnUiThread(this::showNoNetView);
             }
             }

+ 5 - 2
app/src/main/java/com/sheep/gamegroup/module/ad_htxd/model/ArticleAd.java

@@ -5,6 +5,8 @@ import com.hoc.hoclib.adlib.NativeADDataInfo;
 import com.hoc.hoclib.adlib.PNative;
 import com.hoc.hoclib.adlib.PNative;
 import com.sheep.gamegroup.model.entity.Article;
 import com.sheep.gamegroup.model.entity.Article;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
+import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 
 
 import rx.functions.Action1;
 import rx.functions.Action1;
@@ -18,7 +20,7 @@ public class ArticleAd extends Article {
 
 
     public static final String FEED = "1D0JLRMA102V277730B60000552042FE";
     public static final String FEED = "1D0JLRMA102V277730B60000552042FE";
     public static final int INDEX = 4;//放在position为4的位置,即第5个
     public static final int INDEX = 4;//放在position为4的位置,即第5个
-    public static final boolean showAd = false;//是否显示广告
+    public static final boolean showAd = TestUtil.isSheep();//是否显示广告
 
 
     private NativeADDataInfo nativeADDataInfo;
     private NativeADDataInfo nativeADDataInfo;
     private PNative pNative;
     private PNative pNative;
@@ -50,13 +52,14 @@ public class ArticleAd extends Article {
             public void onNativeAdIsReady(NativeADDataInfo nativeAdData) {
             public void onNativeAdIsReady(NativeADDataInfo nativeAdData) {
                 ArticleAd articleAd = new ArticleAd(nativeAdData, pNative);
                 ArticleAd articleAd = new ArticleAd(nativeAdData, pNative);
                 boolean success = adAction1.call(articleAd);
                 boolean success = adAction1.call(articleAd);
-
+                LogUtil.println("ArticleAd", "fetchNativeData", "onNativeAdIsReady", success);
                 pNative.handleImp();
                 pNative.handleImp();
                 callBack.call(success);
                 callBack.call(success);
             }
             }
 
 
             @Override
             @Override
             public void onLoadNativeAdFail() {
             public void onLoadNativeAdFail() {
+                LogUtil.println("ArticleAd", "fetchNativeData", "onLoadNativeAdFail");
                 callBack.call(false);
                 callBack.call(false);
             }
             }
         })
         })

+ 23 - 0
app/src/main/java/com/sheep/gamegroup/module/find/activity/ActFind.java

@@ -0,0 +1,23 @@
+package com.sheep.gamegroup.module.find.activity;
+
+import android.support.v4.app.Fragment;
+
+import com.sheep.gamegroup.absBase.BaseContainerActivity;
+import com.sheep.gamegroup.module.find.fragment.FgtFind2;
+import com.sheep.jiuyan.samllsheep.R;
+
+/**
+ * Created by realicing on 2019/1/28.
+ * realicing@sina.com
+ */
+public class ActFind extends BaseContainerActivity {
+    @Override
+    protected int getLayoutId() {
+        return R.layout.common_container_nofit;
+    }
+
+    @Override
+    protected Fragment initFragment() {
+        return new FgtFind2();
+    }
+}

+ 219 - 0
app/src/main/java/com/sheep/gamegroup/module/find/fragment/FgtFind2.java

@@ -0,0 +1,219 @@
+package com.sheep.gamegroup.module.find.fragment;
+
+import android.app.Activity;
+import android.provider.MediaStore;
+import android.support.design.widget.TabLayout;
+import android.support.v4.view.ViewPager;
+import android.view.KeyEvent;
+import android.view.View;
+import android.widget.ImageView;
+
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+import com.sheep.gamegroup.model.entity.ArticleTag;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.KeyEventUtil;
+import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.ViewUtil;
+import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
+import com.sheep.gamegroup.view.fragment.FgtArticleVideo;
+import com.sheep.gamegroup.view.fragment.FgtFindChild;
+import com.sheep.gamegroup.view.fragment.FgtWatchFocus;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import org.afinal.simplecache.ApiKey;
+
+import java.util.List;
+
+import butterknife.BindView;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+import rx.functions.Action1;
+
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.FIND_TAG;
+
+/**
+ * Created by realicing on 2018/6/27.
+ * realicing@sina.com
+ * 主页--发现模块
+ */
+public class FgtFind2 extends BaseFragment {
+    private Activity activity;
+
+    @BindView(R.id.indicator)
+    TabLayout indicator;
+    @BindView(R.id.pager)
+    ViewPager pager;
+    @BindView(R.id.add_article)
+    View add_article;
+    @BindView(R.id.add_article_expand)
+    ImageView add_article_expand;
+    @BindView(R.id.add_article_iv)
+    ImageView add_article_iv;
+    @BindView(R.id.add_article_camera)
+    ImageView add_article_camera;
+    @BindView(R.id.add_article_pic)
+    ImageView add_article_pic;
+    @BindView(R.id.img_baseactivity_title)
+    ImageView img_baseactivity_title;
+
+    private TitleFragmentListAdapter mAdapter;
+
+    private void initView() {
+        mAdapter = new TitleFragmentListAdapter(getChildFragmentManager());
+        ArticleTag articleTagAll = new ArticleTag();
+        articleTagAll.setId(0);
+        articleTagAll.setName("全部");
+        mAdapter.add(FgtFindChild.newInstance(articleTagAll), articleTagAll.getName());
+        //悬浮
+        ViewUtil.setImage(add_article_expand, ViewUtil.getNetImgByName("add_article_expand"));
+        if (!onlyChooseVideo) {
+            ViewUtil.setImage(add_article_iv, ViewUtil.getNetImgByName("add_article"));
+            ViewUtil.setImage(add_article_camera, ViewUtil.getNetImgByName("add_article_camera"));
+            ViewUtil.setImage(add_article_pic, ViewUtil.getNetImgByName("add_article_pic"));
+        }
+        ViewUtil.setVisibility(add_article, false);
+        ViewUtil.setVisibility(add_article_iv, false);
+        ViewUtil.setVisibility(add_article_camera, false);
+        ViewUtil.setVisibility(add_article_pic, false);
+        add_article.setOnClickListener(view -> {
+            if (onlyChooseVideo) {
+                Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO);
+            } else {
+                changeAddArticle(add_article_iv.getVisibility() == View.VISIBLE);
+            }
+        });
+        if (!onlyChooseVideo) {
+            add_article_camera.setOnClickListener(view -> {
+//                changeAddArticle(true);
+//                G.showToast("添加视频");
+                Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO);
+            });
+            add_article_pic.setOnClickListener(view -> {
+//                changeAddArticle(true);
+//                G.showToast("添加图片");
+                Jump2View.getInstance().gotoActPublishArticle(MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE);
+            });
+        }
+        img_baseactivity_title.setOnClickListener(this::onClickBackImg);
+    }
+
+    private boolean onlyChooseVideo = true;//只选择视频
+
+    private void changeAddArticle(boolean isExpand) {
+        ViewUtil.setVisibility(add_article_iv, !isExpand);
+        ViewUtil.setVisibility(add_article_camera, !isExpand);
+        ViewUtil.setVisibility(add_article_pic, !isExpand);
+        add_article_expand.setAlpha(isExpand ? 1.0f : 0.0f);
+    }
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_find2;
+    }
+
+    @Override
+    public void onViewCreated() {
+        activity = getActivity();
+        initView();
+        initData();
+    }
+
+    private void initData() {
+        //尝试获取缓存数据
+        List<ArticleTag> newList = DataUtil.getInstance().getCacheList(ApiKey.articles_tags, ArticleTag.class);
+        if (ListUtil.isEmpty(newList)) {//这里有个bug,如果一开始有数据,等到服务器数据发生变化时,就会始终使用老的数据,除非有缓存时长限制,但是这样又导致数据不是最新的,所以在SysAppUtil中的checkNet方法直接更新该列表。
+            initNetData(true);
+        } else {
+            list.addAll(newList);
+            loadList();
+        }
+    }
+
+    @Override
+    public void initDataOnVisibleToUser() {
+
+    }
+
+    private void initNetData(final boolean loadPager) {
+        SheepApp.getInstance().getNetComponent().getApiService().getFindTagList()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        List<ArticleTag> newList = baseMessage.getDatas(ArticleTag.class);
+                        list.clear();
+                        list.addAll(newList);
+                        if (loadPager && !ListUtil.isEmpty(list)) {
+                            loadList();
+                        }
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                    }
+                });
+    }
+
+    //没有添加数据返回true
+    private void loadList() {
+        CommonUtil.getInstance().initUrlConfigByNet("awaken_on", new Action1<String>() {
+            @Override
+            public void call(String url) {
+                int awaken_on = NumberFormatUtils.parseInteger(url);
+                int count = 1;
+                for (ArticleTag findLabel : list) {
+                    switch (findLabel.getName()) {
+                        case "视频":
+                            mAdapter.add(FgtArticleVideo.newInstance(findLabel.getId()), findLabel.getName());
+                            break;
+                        default:
+                            mAdapter.add(FgtFindChild.newInstance(findLabel), findLabel.getName());
+                            break;
+                    }
+                    count++;
+                }
+                if (awaken_on == 1) {
+                    count++;
+                    mAdapter.add(new FgtWatchFocus(), "看点", 2);
+                }
+                pager.setAdapter(mAdapter);
+                indicator.setupWithViewPager(pager);
+                pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+                    @Override
+                    public void onPageScrolled(int i, float v, int i1) {
+
+                    }
+
+                    @Override
+                    public void onPageSelected(int i) {
+                        ViewUtil.setVisibility(add_article, mAdapter.getItem(i) instanceof FgtArticleVideo);
+                        FIND_TAG.onEvent("find_tag_name", ListUtil.hasIndex(list, i - 1) ? list.get(i - 1).getName() : "全部");
+                    }
+
+                    @Override
+                    public void onPageScrollStateChanged(int i) {
+
+                    }
+                });
+                CommonUtil.getInstance().reflex(indicator, activity);
+                pager.setOffscreenPageLimit(count);
+
+            }
+        });
+    }
+
+    private List<ArticleTag> list = ListUtil.emptyList();
+
+    //点击返回
+    public void onClickBackImg(View view) {
+        KeyEventUtil.sendKeyDownUp(KeyEvent.KEYCODE_BACK);
+    }
+}

+ 71 - 0
app/src/main/java/com/sheep/gamegroup/module/pay/activity/SheepWXPayEntryActivity.java

@@ -0,0 +1,71 @@
+package com.sheep.gamegroup.module.pay.activity;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+
+import com.sheep.gamegroup.util.ApiJSONUtil;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.LogUtil;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.tencent.mm.opensdk.constants.ConstantsAPI;
+import com.tencent.mm.opensdk.modelbase.BaseReq;
+import com.tencent.mm.opensdk.modelbase.BaseResp;
+import com.tencent.mm.opensdk.modelpay.PayResp;
+import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
+
+import org.greenrobot.eventbus.EventBus;
+
+/**
+ * Created by realicing on 2019/1/29.
+ * realicing@sina.com
+ * <p>
+ * 微信支付回调
+ */
+public abstract class SheepWXPayEntryActivity extends Activity implements IWXAPIEventHandler {
+
+    private static final String TAG = "SheepWXPayEntryActivity";
+
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.pay_result);
+
+        SheepApp.getInstance().getWxApi().handleIntent(getIntent(), this);
+    }
+
+    @Override
+    protected void onNewIntent(Intent intent) {
+        super.onNewIntent(intent);
+        setIntent(intent);
+        SheepApp.getInstance().getWxApi().handleIntent(intent, this);
+    }
+
+    @Override
+    public void onReq(BaseReq req) {
+    }
+
+    @Override
+    public void onResp(BaseResp resp) {
+        LogUtil.println(TAG, "onPayFinish, errCode = " + resp.errCode);
+        String result = "";
+        if (resp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) {
+            switch (resp.errCode) {
+                case 0://支付成功
+                    ApiJSONUtil.missionExecute(4);
+                    break;
+                case -1://错误	可能的原因:签名错误、未注册APPID、项目设置APPID不正确、注册的APPID与设置的不匹配、其他异常等。
+                    break;
+                case -2://用户取消	无需处理。发生场景:用户不支付了,点击取消,返回APP。
+                    break;
+            }
+            result = String.valueOf(resp.errCode + 9000);//"9000" 代表支付成功
+        }
+        if(resp instanceof PayResp)
+            EventBus.getDefault().post(resp);
+        Jump2View.getInstance().goRechargeResultAct(this, result);
+        finish();
+    }
+}

+ 3 - 62
app/src/main/java/com/sheep/gamegroup/module/skin/util/SkinUtil.java

@@ -1,20 +1,15 @@
 package com.sheep.gamegroup.module.skin.util;
 package com.sheep.gamegroup.module.skin.util;
 
 
 import android.app.Activity;
 import android.app.Activity;
-import android.content.ComponentName;
-import android.content.pm.PackageManager;
 import android.text.TextUtils;
 import android.text.TextUtils;
 
 
 import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.module.plugin.util.SheepPluginUtil;
 import com.sheep.gamegroup.module.plugin.util.SheepPluginUtil;
-import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.Md5Util;
 import com.sheep.gamegroup.util.Md5Util;
 import com.sheep.gamegroup.util.PreferenceUtils;
 import com.sheep.gamegroup.util.PreferenceUtils;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.TestUtil;
-import com.sheep.gamegroup.view.activity.SplashAct;
-import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 
 
@@ -24,12 +19,13 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.schedulers.Schedulers;
 import io.reactivex.schedulers.Schedulers;
 import rx.functions.Action1;
 import rx.functions.Action1;
 import skin.support.SkinCompatManager;
 import skin.support.SkinCompatManager;
-//import skin.support.app.SkinAppCompatViewInflater;
 import skin.support.app.SkinCardViewInflater;
 import skin.support.app.SkinCardViewInflater;
 import skin.support.constraint.app.SkinConstraintViewInflater;
 import skin.support.constraint.app.SkinConstraintViewInflater;
 import skin.support.design.app.SkinMaterialViewInflater;
 import skin.support.design.app.SkinMaterialViewInflater;
 import skin.support.utils.SkinPreference;
 import skin.support.utils.SkinPreference;
 
 
+//import skin.support.app.SkinAppCompatViewInflater;
+
 /**
 /**
  * Created by realicing on 2019/1/15.
  * Created by realicing on 2019/1/15.
  * realicing@sina.com
  * realicing@sina.com
@@ -68,7 +64,6 @@ public class SkinUtil {
             if(TextUtils.isEmpty(curSkinMd5) || !TextUtils.isEmpty(curSkinName)){
             if(TextUtils.isEmpty(curSkinMd5) || !TextUtils.isEmpty(curSkinName)){
                 PreferenceUtils.setPrefString(SheepApp.getInstance(), KEY_CUR_SKIN_MD5, "");
                 PreferenceUtils.setPrefString(SheepApp.getInstance(), KEY_CUR_SKIN_MD5, "");
                 restoreDefaultTheme();
                 restoreDefaultTheme();
-                changeDefaultIcon();
             }
             }
             action1.call(null);
             action1.call(null);
             return;
             return;
@@ -104,8 +99,6 @@ public class SkinUtil {
                             public void onSuccess() {
                             public void onSuccess() {
                                 LogUtil.println(SkinUtil.class.getSimpleName(), "changeSkin", "loadSkin", skinName, "onSuccess");
                                 LogUtil.println(SkinUtil.class.getSimpleName(), "changeSkin", "loadSkin", skinName, "onSuccess");
                                 curPlugin = willLoadPlugin;
                                 curPlugin = willLoadPlugin;
-                                if(isLoadNewYearSkin())
-                                    changeIcon();
                                 PreferenceUtils.setPrefString(SheepApp.getInstance(), KEY_CUR_SKIN_MD5, md5);
                                 PreferenceUtils.setPrefString(SheepApp.getInstance(), KEY_CUR_SKIN_MD5, md5);
                                 action1.call(null);
                                 action1.call(null);
                             }
                             }
@@ -151,61 +144,9 @@ public class SkinUtil {
     public static String getSkinPath(String skinName) {
     public static String getSkinPath(String skinName) {
         return SheepPluginUtil.getFileByName(skinName, curPlugin).getAbsolutePath();
         return SheepPluginUtil.getFileByName(skinName, curPlugin).getAbsolutePath();
     }
     }
-
-    public static void changeIcon() {
-        //拿到我们注册的MainActivity组件
-        ComponentName defaultComponent = new ComponentName(SheepApp.getInstance(), SplashAct.class.getName());  //拿到默认的组件
-        //拿到我注册的别名test组件
-        ComponentName testComponent = new ComponentName(SheepApp.getInstance(), BuildConfig.APPLICATION_ID + ".NewYearSplashAct");
-        if(!TestUtil.isDev())
-            disableComponent(defaultComponent);
-        enableComponent(testComponent);
-    }
-
-    public static void changeDefaultIcon() {
-        //拿到我们注册的MainActivity组件
-        ComponentName defaultComponent = new ComponentName(SheepApp.getInstance(), SplashAct.class.getName());  //拿到默认的组件
-        //拿到我注册的别名test组件
-        ComponentName testComponent = new ComponentName(SheepApp.getInstance(), BuildConfig.APPLICATION_ID + ".NewYearSplashAct");
-        enableComponent(defaultComponent);
-        disableComponent(testComponent);
-    }
-    /**
-     * 启用组件
-     *
-     * @param componentName
-     */
-    private static void enableComponent(ComponentName componentName) {
-        PackageManager packageManager = SheepApp.getInstance().getPackageManager();
-        int state = packageManager.getComponentEnabledSetting(componentName);
-        if (state == PackageManager.COMPONENT_ENABLED_STATE_ENABLED) {
-            //已经启用
-            return;
-        }
-        packageManager.setComponentEnabledSetting(componentName,
-                PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
-                PackageManager.DONT_KILL_APP);
-    }
-
-    /**
-     * 禁用组件
-     *
-     * @param componentName
-     */
-    private static void disableComponent(ComponentName componentName) {
-        PackageManager packageManager = SheepApp.getInstance().getPackageManager();
-        int state = packageManager.getComponentEnabledSetting(componentName);
-        if (state == PackageManager.COMPONENT_ENABLED_STATE_DISABLED) {
-            //已经禁用
-            return;
-        }
-        packageManager.setComponentEnabledSetting(componentName,
-                PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
-                PackageManager.DONT_KILL_APP);
-    }
     //获取应用图标
     //获取应用图标
     public static int getAppIcon(){
     public static int getAppIcon(){
-        return isLoadNewYearSkin() ? R.mipmap.icon_new_year : R.mipmap.icon;
+        return R.mipmap.icon;
     }
     }
 
 
     /**
     /**

+ 19 - 0
app/src/main/java/com/sheep/gamegroup/util/ApiJSONUtil.java

@@ -121,4 +121,23 @@ public class ApiJSONUtil {
                     }
                     }
                 });
                 });
     }
     }
+    //记录支付成功
+    public static void missionExecute(int act) {
+        JSONObject json = new JSONObject();
+        json.put("act", act);
+        SheepApp.getInstance().getNetComponent().getApiService()
+                .missionExecute(json)
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        LogUtil.logE(baseMessage.getErrorMsg() + " " + baseMessage.getMsg());
+                    }
+
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                    }
+                });
+    }
 }
 }

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

@@ -77,6 +77,8 @@ import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
 import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+import com.tencent.mm.opensdk.modelpay.PayReq;
+import com.tencent.mm.opensdk.openapi.IWXAPI;
 import com.umeng.socialize.UMAuthListener;
 import com.umeng.socialize.UMAuthListener;
 import com.umeng.socialize.UMShareAPI;
 import com.umeng.socialize.UMShareAPI;
 import com.umeng.socialize.bean.SHARE_MEDIA;
 import com.umeng.socialize.bean.SHARE_MEDIA;
@@ -1012,6 +1014,22 @@ public class CommonUtil {
                 .observeOn(AndroidSchedulers.mainThread())
                 .observeOn(AndroidSchedulers.mainThread())
                 .subscribe(observer);
                 .subscribe(observer);
     }
     }
+    /**
+     * 微信支付
+     * apk签名:c69316882eada62ae560c31076740400
+     * @param payInfo
+     */
+    public void wxpay(IWXAPI api, final JSONObject payInfo) {
+        PayReq request = new PayReq();
+        request.appId = payInfo.getString("appid");
+        request.partnerId = payInfo.getString("partnerid");
+        request.prepayId = payInfo.getString("prepayid");
+        request.packageValue = payInfo.getString("package");
+        request.nonceStr = payInfo.getString("noncestr");
+        request.timeStamp = payInfo.getString("timestamp");
+        request.sign = payInfo.getString("sign");
+        api.sendReq(request);
+    }
 
 
     /**
     /**
      * ACache.get(context).put("url_config", (JSONObject) urlConfig);
      * ACache.get(context).put("url_config", (JSONObject) urlConfig);

+ 3 - 13
app/src/main/java/com/sheep/gamegroup/util/Jump2View.java

@@ -66,6 +66,7 @@ import com.sheep.gamegroup.module.login.ChangePasswordAct;
 import com.sheep.gamegroup.module.login.LoginAct;
 import com.sheep.gamegroup.module.login.LoginAct;
 import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.module.plugin.util.SheepPluginUtil;
 import com.sheep.gamegroup.module.plugin.util.SheepPluginUtil;
+import com.sheep.gamegroup.module.skin.util.SkinUtil;
 import com.sheep.gamegroup.module.user.activity.ActVip;
 import com.sheep.gamegroup.module.user.activity.ActVip;
 import com.sheep.gamegroup.module.user.model.UserAddressInfo;
 import com.sheep.gamegroup.module.user.model.UserAddressInfo;
 import com.sheep.gamegroup.module.yf_shop.model.ReceiveCouponsCheckResq;
 import com.sheep.gamegroup.module.yf_shop.model.ReceiveCouponsCheckResq;
@@ -142,6 +143,7 @@ import com.sheep.gamegroup.view.activity.FeedbackAct;
 import com.sheep.gamegroup.view.activity.GameTaskOrderListAct;
 import com.sheep.gamegroup.view.activity.GameTaskOrderListAct;
 import com.sheep.gamegroup.view.activity.GamemakeMoneyAct;
 import com.sheep.gamegroup.view.activity.GamemakeMoneyAct;
 import com.sheep.gamegroup.view.activity.LieMakeMoneyAct;
 import com.sheep.gamegroup.view.activity.LieMakeMoneyAct;
+import com.sheep.gamegroup.view.activity.NewYearActMyMoney;
 import com.sheep.gamegroup.view.activity.PersonalCenterAct;
 import com.sheep.gamegroup.view.activity.PersonalCenterAct;
 import com.sheep.gamegroup.view.activity.PersonalInfoAct;
 import com.sheep.gamegroup.view.activity.PersonalInfoAct;
 import com.sheep.gamegroup.view.activity.RealNameAuthenAct;
 import com.sheep.gamegroup.view.activity.RealNameAuthenAct;
@@ -149,7 +151,6 @@ import com.sheep.gamegroup.view.activity.RechargeAct;
 import com.sheep.gamegroup.view.activity.RechargeQAct;
 import com.sheep.gamegroup.view.activity.RechargeQAct;
 import com.sheep.gamegroup.view.activity.RechargeResultAct;
 import com.sheep.gamegroup.view.activity.RechargeResultAct;
 import com.sheep.gamegroup.view.activity.SignRankingsAct;
 import com.sheep.gamegroup.view.activity.SignRankingsAct;
-import com.sheep.gamegroup.view.activity.SignRechargeAct;
 import com.sheep.gamegroup.view.activity.TaskDetailAct;
 import com.sheep.gamegroup.view.activity.TaskDetailAct;
 import com.sheep.gamegroup.view.activity.TaskDetailAddQQAct;
 import com.sheep.gamegroup.view.activity.TaskDetailAddQQAct;
 import com.sheep.gamegroup.view.activity.TaskDetailCreditCardAct;
 import com.sheep.gamegroup.view.activity.TaskDetailCreditCardAct;
@@ -1069,7 +1070,7 @@ public class Jump2View {
      * @param o
      * @param o
      */
      */
     public void goMyMoney(Context context, Object o) {
     public void goMyMoney(Context context, Object o) {
-        Intent intent = new Intent(context, ActMyMoney.class);
+        Intent intent = new Intent(context, SkinUtil.isLoadNewYearSkin() ? NewYearActMyMoney.class : ActMyMoney.class);
         context.startActivity(intent);
         context.startActivity(intent);
         USER_MY_MONEY.onEvent();
         USER_MY_MONEY.onEvent();
     }
     }
@@ -1493,17 +1494,6 @@ public class Jump2View {
     }
     }
 
 
     /**
     /**
-     * (一元报名充值界面)
-     *
-     * @param context
-     * @param o
-     */
-    public void goSignRechargeAct(Context context, Object o) {
-        Intent intent = new Intent(context, SignRechargeAct.class);
-        context.startActivity(intent);
-    }
-
-    /**
      * 重新登录
      * 重新登录
      */
      */
     public void gotoLoginAgain() {
     public void gotoLoginAgain() {

+ 10 - 1
app/src/main/java/com/sheep/gamegroup/util/ListUtil.java

@@ -240,8 +240,17 @@ public class ListUtil {
         return false;
         return false;
     }
     }
 
 
+    //插入第几个位置
+    public static <T> boolean insertIndex(List<T> allList, T item, int index) {
+        int size = size(allList);
+        if(index > size){
+            return false;
+        }
+        allList.add(index, item);
+        return true;
+    }
     //插入倒数第几个位置
     //插入倒数第几个位置
-    public static <T> boolean addLastIndex(List<T> allList, T item, int index) {
+    public static <T> boolean insertLastIndex(List<T> allList, T item, int index) {
         int size = size(allList);
         int size = size(allList);
         int position = size - index;
         int position = size - index;
         if(position < 0){
         if(position < 0){

+ 25 - 0
app/src/main/java/com/sheep/gamegroup/util/NetUtil.java

@@ -6,6 +6,8 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.Intent;
 import android.net.ConnectivityManager;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.net.NetworkInfo;
+import android.os.Build;
+import android.text.TextUtils;
 
 
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 
 
@@ -86,4 +88,27 @@ public class NetUtil {
         intent.setAction("android.intent.action.VIEW");
         intent.setAction("android.intent.action.VIEW");
         activity.startActivityForResult(intent, 0);
         activity.startActivityForResult(intent, 0);
     }
     }
+
+    /**
+     * 判断是否使用代理
+     * @return
+     */
+    public static boolean isWifiProxy() {
+        if(TestUtil.isTest()){
+            return false;
+        }
+        Context context = SheepApp.getInstance();
+        final boolean IS_ICS_OR_LATER = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
+        String proxyAddress;
+        int proxyPort;
+        if (IS_ICS_OR_LATER) {
+            proxyAddress = System.getProperty("http.proxyHost");
+            String portStr = System.getProperty("http.proxyPort");
+            proxyPort = Integer.parseInt((portStr != null ? portStr : "-1"));
+        } else {
+            proxyAddress = android.net.Proxy.getHost(context);
+            proxyPort = android.net.Proxy.getPort(context);
+        }
+        return (!TextUtils.isEmpty(proxyAddress)) && (proxyPort != -1);
+    }
 }
 }

+ 79 - 80
app/src/main/java/com/sheep/gamegroup/util/SysAppUtil.java

@@ -451,15 +451,15 @@ public class SysAppUtil {
                 e.printStackTrace();
                 e.printStackTrace();
             }
             }
         }
         }
-        checkUpdateNewVersion(activity, ignoreMd5, action1);
-//        if(TestUtil.isSheep()) {
-//            checkUpdateNewVersion(activity, ignoreMd5, action1);
-//        } else if(!TestUtil.isDev()) {
-//            TestUtil.checkUpdateFromJenkins(activity, ignoreMd5, action1);
-//        }
+//        checkUpdateNewVersion(activity, ignoreMd5, action1);
+        if(TestUtil.isSheep()) {
+            checkUpdateNewVersion(ignoreMd5, action1);
+        } else if(!TestUtil.isDev()) {
+            TestUtil.checkUpdateFromJenkins(activity, ignoreMd5, action1);
+        }
     }
     }
     //通过接口检查更新
     //通过接口检查更新
-    public static void checkUpdateNewVersion(final Activity activity, final String ignoreMd5, final Action1<Integer> action1) {
+    public static void checkUpdateNewVersion(final String ignoreMd5, final Action1<Integer> action1) {
         SheepApp.getInstance().getNetComponent().getApiService().getNewVersion(SheepApp.getInstance().getConnectAddress().getVersionType())
         SheepApp.getInstance().getNetComponent().getApiService().getNewVersion(SheepApp.getInstance().getConnectAddress().getVersionType())
                 .subscribeOn(Schedulers.io())
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
                 .observeOn(AndroidSchedulers.mainThread())
@@ -467,7 +467,7 @@ public class SysAppUtil {
                     @Override
                     @Override
                     public void onNext(BaseMessage baseMessage) {
                     public void onNext(BaseMessage baseMessage) {
                         Version version = baseMessage.getData(Version.class);
                         Version version = baseMessage.getData(Version.class);
-                        loadVersion(activity, ignoreMd5, action1, version);
+                        loadVersion(ignoreMd5, action1, version);
                     }
                     }
 
 
                     @Override
                     @Override
@@ -481,7 +481,7 @@ public class SysAppUtil {
                 });
                 });
     }
     }
 
 
-    private static void loadVersion(final Activity activity, final String ignoreMd5, final Action1<Integer> action1, final Version version) {
+    private static void loadVersion(final String ignoreMd5, final Action1<Integer> action1, final Version version) {
         if(version == null){
         if(version == null){
             if(ignoreMd5 == null)
             if(ignoreMd5 == null)
                 G.showToast("当前版本为最新版本,无需更新");
                 G.showToast("当前版本为最新版本,无需更新");
@@ -530,91 +530,90 @@ public class SysAppUtil {
             if(action1 != null)
             if(action1 != null)
                 action1.call(0);
                 action1.call(0);
         } else {//有新版本
         } else {//有新版本
+            showUpgradeByVersion(version, action1);
+        }
+    }
+
+    public static void showUpgradeByVersion(Version version, Action1<Integer> action1) {
+        if(!TextUtils.isEmpty(version.getAddress()))
             ACache.get(SheepApp.getInstance()).put("version_url", version.getAddress());
             ACache.get(SheepApp.getInstance()).put("version_url", version.getAddress());
-            final String fileName = version.getMd5_address()+".apk";
-            final File file = new File(ClassFileHelper.DIR, fileName);
-            DialogConfig dialogConfig = new DialogConfig();
-            dialogConfig.setTitle("小绵羊V"+version.getVersion_name());
-            dialogConfig.setMsg(TextUtils.isEmpty(version.getUpdate_content()) ? "当前版本小绵羊V"+getConnectAdrressPackageInfo().versionName : version.getUpdate_content()).setMsgGravity(Gravity.START)
-                    .setBtnLeftText(file.exists() ? "立即安装" : "立即更新").setBtnLeftNotDissDialog(true).setBtnLeftOnClickListener(new View.OnClickListener() {
-                private void installApk(File file){
-                    if(file != null && file.exists()) {
-                        //升级后继承渠道
-                        String channel = ChannelContent.getInstance().getChannel_name();
-                        try {
-                            if(!TextUtils.isEmpty(channel) && !ZipChannelUtil.isAddQUA(file)){
-                                ZipChannelUtil.writeQUA(file, channel);
-                            }
-                        } catch (IOException e) {
-                            e.printStackTrace();
+        final String fileName = version.getMd5_address()+".apk";
+        final File file = new File(ClassFileHelper.DIR, fileName);
+        DialogConfig dialogConfig = new DialogConfig();
+        dialogConfig.setTitle("小绵羊V"+version.getVersion_name());
+        dialogConfig.setMsg(TextUtils.isEmpty(version.getUpdate_content()) ? "当前版本小绵羊V"+getConnectAdrressPackageInfo().versionName : version.getUpdate_content()).setMsgGravity(Gravity.START)
+                .setBtnLeftText(file.exists() ? "立即安装" : "立即更新").setBtnLeftNotDissDialog(true).setBtnLeftOnClickListener(new View.OnClickListener() {
+            private void installApk(File file){
+                if(file != null && file.exists()) {
+                    //升级后继承渠道
+                    String channel = ChannelContent.getInstance().getChannel_name();
+                    try {
+                        if(!TextUtils.isEmpty(channel) && !ZipChannelUtil.isAddQUA(file)){
+                            ZipChannelUtil.writeQUA(file, channel);
                         }
                         }
-                        ApkUtils.installApk(SheepApp.getInstance(), file.getAbsolutePath());
+                    } catch (IOException e) {
+                        e.printStackTrace();
                     }
                     }
+                    ApkUtils.installApk(SheepApp.getInstance(), file.getAbsolutePath());
                 }
                 }
-                @Override
-                public void onClick(final View view) {
-                    if(view instanceof TextView)
-                        UPGRADE_DIALOG_BT.onEvent("action", ((TextView) view).getText());
-                    if(file.exists() && Md5Util.checkMD5(version.getMd5_address(), file)){//文件存在并且md5值相同则直接安装
-                        installApk(file);
-                    } else if(TextUtils.isEmpty(version.getAddress())){//地址错误
-                        G.showToast(R.string.error_download_link);
-                    } else {//下载安装
-                        OkHttpUtils.get().url(version.getAddress()).build().execute(new FileCallBack(ClassFileHelper.DIR, fileName) {
-                            @Override
-                            public void inProgress(float progress, long total, int id) {
-                                if(view instanceof TextView) {
-                                    TextView btnLeftTextView = (TextView) view;
-                                    btnLeftTextView.setEnabled(false);
-                                    btnLeftTextView.setText(String.format(Locale.CHINA, "%d%%", Math.round(progress * 100)));
-                                }
+            }
+            @Override
+            public void onClick(final View view) {
+                if(view instanceof TextView)
+                    UPGRADE_DIALOG_BT.onEvent("action", ((TextView) view).getText());
+                if(file.exists() && Md5Util.checkMD5(version.getMd5_address(), file)){//文件存在并且md5值相同则直接安装
+                    installApk(file);
+                } else if(TextUtils.isEmpty(version.getAddress())){//地址错误
+                    G.showToast(R.string.error_download_link);
+                } else {//下载安装
+                    OkHttpUtils.get().url(version.getAddress()).build().execute(new FileCallBack(ClassFileHelper.DIR, fileName) {
+                        @Override
+                        public void inProgress(float progress, long total, int id) {
+                            if(view instanceof TextView) {
+                                TextView btnLeftTextView = (TextView) view;
+                                btnLeftTextView.setEnabled(false);
+                                btnLeftTextView.setText(String.format(Locale.CHINA, "%d%%", Math.round(progress * 100)));
+                            }
+                        }
+                        @Override
+                        public void onError(Call call, Exception e, int id) {
+                            if(view instanceof TextView) {
+                                TextView btnLeftTextView = (TextView) view;
+                                btnLeftTextView.setEnabled(true);
+                                btnLeftTextView.setText("重新下载");
                             }
                             }
-                            @Override
-                            public void onError(Call call, Exception e, int id) {
-                                if(view instanceof TextView) {
+                        }
+
+                        @Override
+                        public void onResponse(File response, int id) {
+                            if(response != null && response.exists()) {
+                                if(view instanceof TextView){
                                     TextView btnLeftTextView = (TextView) view;
                                     TextView btnLeftTextView = (TextView) view;
                                     btnLeftTextView.setEnabled(true);
                                     btnLeftTextView.setEnabled(true);
-                                    btnLeftTextView.setText("重新下载");
+                                    btnLeftTextView.setText("立即安装");
                                 }
                                 }
-                            }
-
-                            @Override
-                            public void onResponse(File response, int id) {
-                                if(response != null && response.exists()) {
-                                    if(view instanceof TextView){
-                                        TextView btnLeftTextView = (TextView) view;
-                                        btnLeftTextView.setEnabled(true);
-                                        btnLeftTextView.setText("立即安装");
-                                    }
 
 
-                                    installApk(response);
-                                }
+                                installApk(response);
                             }
                             }
-                        });
-                    }
+                        }
+                    });
                 }
                 }
-            });
-            if(version.isForceUpdate() && TestUtil.isSheep()){//强更
-                dialogConfig.setCancelable(false);
-            } else {
-                dialogConfig.setBtnRightText("下次更新").setBtnRightOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        SpUtils.saveIgnoreMd5(TestUtil.isSheep() ? version.getVersion_number()+"" : version.getMd5_address());
-                        if(view instanceof TextView)
-                            UPGRADE_DIALOG_BT.onEvent("action", ((TextView) view).getText());
-                    }
-                });
             }
             }
-            dialog = ViewUtil.showMsgDialog(activity, dialogConfig);
-            dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
-                @Override
-                public void onDismiss(DialogInterface dialogInterface) {
-                    if (action1 != null)
-                        action1.call(0);
-                }
+        });
+        if(version.isForceUpdate() && TestUtil.isSheep()){//强更
+            dialogConfig.setCancelable(false);
+        } else {
+            dialogConfig.setBtnRightText("下次更新").setBtnRightOnClickListener(view -> {
+                SpUtils.saveIgnoreMd5(TestUtil.isSheep() ? version.getVersion_number()+"" : version.getMd5_address());
+                if(view instanceof TextView)
+                    UPGRADE_DIALOG_BT.onEvent("action", ((TextView) view).getText());
             });
             });
         }
         }
+        dialog = ViewUtil.showUpgradeDialog(SheepApp.getInstance().getCurrentActivity(), dialogConfig);
+        dialog.setOnDismissListener(dialogInterface -> {
+            if (action1 != null)
+                action1.call(0);
+        });
     }
     }
 
 
     private static PackageInfo getConnectAdrressPackageInfo() {
     private static PackageInfo getConnectAdrressPackageInfo() {

+ 11 - 8
app/src/main/java/com/sheep/gamegroup/util/TestUtil.java

@@ -40,6 +40,7 @@ import com.sheep.gamegroup.model.entity.DiscoveryVideo;
 import com.sheep.gamegroup.model.entity.LoginEntity;
 import com.sheep.gamegroup.model.entity.LoginEntity;
 import com.sheep.gamegroup.model.entity.LoginUser;
 import com.sheep.gamegroup.model.entity.LoginUser;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.model.entity.Version;
 import com.sheep.gamegroup.model.entity.Video;
 import com.sheep.gamegroup.model.entity.Video;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.plugin.model.Plugin;
 import com.sheep.gamegroup.module.plugin.model.Plugin;
@@ -260,7 +261,7 @@ public class TestUtil {
      */
      */
     public static void test(final Activity activity) {
     public static void test(final Activity activity) {
         final String[] items = {"复制token", "添加token", "复制打点数据", "从jenkins下载小绵羊安装包", "测试表情包",
         final String[] items = {"复制token", "添加token", "复制打点数据", "从jenkins下载小绵羊安装包", "测试表情包",
-                "少数民族姓名", "开启皮肤", "不开启皮肤", "我的游戏", "优惠券弹窗", "填写收件地址弹窗",
+                "测试升级对话框","少数民族姓名", "开启皮肤", "不开启皮肤", "我的游戏", "优惠券弹窗", "填写收件地址弹窗",
                 "朗读文字", "游戏搜索", "测试插件","测试bitmap", "剪切视频", "我的关注", "足迹",
                 "朗读文字", "游戏搜索", "测试插件","测试bitmap", "剪切视频", "我的关注", "足迹",
                 "测试联通卡", "测试联通卡2", "测试签名1", "测试签名2", "测试孔剑秋faq正式服",
                 "测试联通卡", "测试联通卡2", "测试签名1", "测试签名2", "测试孔剑秋faq正式服",
                 "跳转QQ1", "跳转QQ2", "跳转QQ3", "跳转白白QQ", "龙猫竞猜", "龙猫竞猜-scheme",
                 "跳转QQ1", "跳转QQ2", "跳转QQ3", "跳转白白QQ", "龙猫竞猜", "龙猫竞猜-scheme",
@@ -280,6 +281,13 @@ public class TestUtil {
                     @Override
                     @Override
                     public void onClick(DialogInterface dialog, int which) {
                     public void onClick(DialogInterface dialog, int which) {
                         switch (items[which]) {
                         switch (items[which]) {
+                            case "测试升级对话框":
+                                Version version = new Version();
+                                version.setMd5_address("123456");
+                                version.setVersion_name(BuildConfig.VERSION_NAME);
+                                version.setUpdate_content("更新内容(测试):\n1.修复bug;\n2.优化界面;\n3.添加宠物模块");
+                                SysAppUtil.showUpgradeByVersion(version, null);
+                                break;
                             case "少数民族姓名":
                             case "少数民族姓名":
                                 G.showToast(Boolean.toString(StringUtils.isChineseName("麦麦提·阿尤甫")));
                                 G.showToast(Boolean.toString(StringUtils.isChineseName("麦麦提·阿尤甫")));
                                 break;
                                 break;
@@ -884,7 +892,7 @@ public class TestUtil {
         OkHttpUtils.get().url("http://10.8.210.20:8080/jenkins/job/android_small_sheep").build().execute(new StringCallback() {
         OkHttpUtils.get().url("http://10.8.210.20:8080/jenkins/job/android_small_sheep").build().execute(new StringCallback() {
             @Override
             @Override
             public void onError(Call call, Exception e, int id) {
             public void onError(Call call, Exception e, int id) {
-                SysAppUtil.checkUpdateNewVersion(activity, ignoreMd5, action1);
+                SysAppUtil.checkUpdateNewVersion(ignoreMd5, action1);
             }
             }
 
 
             @Override
             @Override
@@ -894,12 +902,7 @@ public class TestUtil {
                 try {
                 try {
                     String result = response.substring(start, end);
                     String result = response.substring(start, end);
                     ArrayList<String> arrayList = StringUtils.getAllSatisfyStr(result, "<a.+?href=\\\"(.+?)\\\">");
                     ArrayList<String> arrayList = StringUtils.getAllSatisfyStr(result, "<a.+?href=\\\"(.+?)\\\">");
-                    ListUtil.removeItem(arrayList, new ListUtil.CallBack<String, Boolean>() {
-                        @Override
-                        public Boolean call(String msg) {
-                            return !msg.endsWith(".apk\">");
-                        }
-                    });
+                    ListUtil.removeItem(arrayList, msg -> !msg.endsWith(".apk\">"));
                     int index = 0;
                     int index = 0;
                     switch (BuildConfig.FLAVOR) {
                     switch (BuildConfig.FLAVOR) {
                         case "developSheeptest":
                         case "developSheeptest":

+ 127 - 16
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -1252,30 +1252,141 @@ public class ViewUtil {
 
 
         if (dialog_close != null) {
         if (dialog_close != null) {
             if (dialogConfig.isCancelable())//
             if (dialogConfig.isCancelable())//
-                dialog_close.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        if (btnCloseOnClickListener != null) {
-                            btnCloseOnClickListener.onClick(v);
-                        }
-                        dialog.dismiss();
+                dialog_close.setOnClickListener(v -> {
+                    if (btnCloseOnClickListener != null) {
+                        btnCloseOnClickListener.onClick(v);
                     }
                     }
+                    dialog.dismiss();
                 });
                 });
             else
             else
                 dialog_close.setVisibility(View.GONE);
                 dialog_close.setVisibility(View.GONE);
         }
         }
-        dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
-            @Override
-            public void onDismiss(DialogInterface dialog) {
-                try {
-                    if (dialogConfig.isFinish()) {
-                        if (mContext instanceof Activity) {
-                            ((Activity) mContext).finish();
+        dialog.setOnDismissListener(dialog1 -> {
+            try {
+                if (dialogConfig.isFinish()) {
+                    if (mContext instanceof Activity) {
+                        ((Activity) mContext).finish();
+                    }
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        });
+
+        if (!(mContext instanceof Activity) && dialog.getWindow() != null) {
+            dialog.getWindow().setType(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ? WindowManager.LayoutParams.TYPE_PHONE : WindowManager.LayoutParams.TYPE_TOAST);
+        }
+        if (!dialogConfig.isCancelable())
+            dialog.setCancelable(false);
+        try {
+            dialog.show();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return dialog;
+    }
+    public static AlertDialog showUpgradeDialog(Context mContext, final DialogConfig dialogConfig) {
+        String title = dialogConfig.getTitle();
+        String msg = dialogConfig.getMsg();
+        String btnLeftText = dialogConfig.getBtnLeftText();
+        final View.OnClickListener btnLeftOnClickListener = dialogConfig.getBtnLeftOnClickListener();
+        String btnRightText = dialogConfig.getBtnRightText();
+        final View.OnClickListener btnRightOnClickListener = dialogConfig.getBtnRightOnClickListener();
+        final View.OnClickListener btnCloseOnClickListener = dialogConfig.getBtnCloseOnClickListener();
+        View dialog_parent = View.inflate(SheepApp.getInstance(), R.layout.dialog_parent_update, null);
+        final AlertDialog dialog = new AlertDialog.Builder(mContext, mContext instanceof Activity ? R.style.MyDialogActivityTheme : R.style.AppTheme_Dialog_Alert).setView(dialog_parent).create();
+        TextView dialog_title = dialog_parent.findViewById(R.id.dialog_title);
+        View dialog_close = dialog_parent.findViewById(R.id.dialog_close);
+        if (!TextUtils.isEmpty(title))
+            dialog_title.setText(title);
+
+        final TextView dialog_msg = dialog_parent.findViewById(R.id.dialog_msg);
+        if (dialog_msg != null) {
+            if (TextUtils.isEmpty(msg)) {
+                dialog_msg.setVisibility(View.GONE);
+            } else {
+                dialog_msg.setVisibility(View.VISIBLE);
+                if (dialogConfig.getMsgIndent() > 0) {
+                    msg = addIndent(msg, dialogConfig.getMsgIndent());
+                }
+                if (msg.startsWith("<p>")) {//<p></p>这种格式的用dialog_msg.setText(Html.fromHtml(msg));方式显示,避免高度变化,影响用户体验
+                    dialog_msg.setText(Html.fromHtml(msg));
+                    if (msg.split("<p>").length > 1) {
+                        ViewGroup.LayoutParams msgLayoutParams = dialog_msg.getLayoutParams();
+                        if (msgLayoutParams instanceof LinearLayout.LayoutParams) {
+                            ((LinearLayout.LayoutParams) msgLayoutParams).bottomMargin *= -2;
+                        } else if (BuildConfig.DEBUG) {
+                            G.showToast("这里的bottomMargin显得多了,需要干掉");
                         }
                         }
+                        dialog_msg.setLayoutParams(msgLayoutParams);
+                    }
+                } else {
+                    setColorMapText(dialog_msg, msg, dialogConfig.getColorMsgMap());
+                }
+                int msgGravity = dialogConfig.getMsgGravity();
+                if (msgGravity != Gravity.NO_GRAVITY)
+                    dialog_msg.setGravity(msgGravity);
+            }
+        }
+
+        TextView dialog_btn_left = dialog_parent.findViewById(R.id.dialog_btn_left);
+        boolean isLeftBtnShow = btnLeftText != null || btnLeftOnClickListener != null;
+        if (dialog_btn_left != null) {
+            dialog_btn_left.setBackgroundResource(R.drawable.selector_button_full_upgrade);
+            dialog_btn_left.setTextColor(Color.WHITE);
+            dialog_btn_left.setVisibility(isLeftBtnShow ? View.VISIBLE : View.GONE);
+            if (!TextUtils.isEmpty(btnLeftText))
+                dialog_btn_left.setText(btnLeftText);
+            dialog_btn_left.setOnClickListener(v -> {
+                if (btnLeftOnClickListener != null) {
+                    btnLeftOnClickListener.onClick(v);
+                }
+                if (!dialogConfig.isBtnLeftNotDissDialog())
+                    dialog.dismiss();
+            });
+        }
+
+        TextView dialog_btn_right = dialog_parent.findViewById(R.id.dialog_btn_right);
+        boolean isRightBtnShow = btnRightText != null || btnRightOnClickListener != null;
+        if (dialog_btn_right != null) {
+            dialog_btn_right.setBackgroundResource(R.drawable.selector_button_full_main);
+            dialog_btn_right.setTextColor(Color.WHITE);
+            dialog_btn_right.setVisibility(isRightBtnShow ? View.VISIBLE : View.GONE);
+            if (!TextUtils.isEmpty(btnRightText))
+                dialog_btn_right.setText(btnRightText);
+            dialog_btn_right.setOnClickListener(v -> {
+                if (btnRightOnClickListener != null) {
+                    btnRightOnClickListener.onClick(v);
+                }
+                dialog.dismiss();
+            });
+        }
+
+        View dialog_btn_center = dialog_parent.findViewById(R.id.dialog_btn_center);
+        if (dialog_btn_center != null) {
+            dialog_btn_center.setVisibility(isLeftBtnShow && isRightBtnShow ? View.VISIBLE : View.GONE);
+        }
+
+        if (dialog_close != null) {
+            if (dialogConfig.isCancelable())//
+                dialog_close.setOnClickListener(v -> {
+                    if (btnCloseOnClickListener != null) {
+                        btnCloseOnClickListener.onClick(v);
+                    }
+                    dialog.dismiss();
+                });
+            else
+                dialog_close.setVisibility(View.GONE);
+        }
+        dialog.setOnDismissListener(dialog1 -> {
+            try {
+                if (dialogConfig.isFinish()) {
+                    if (mContext instanceof Activity) {
+                        ((Activity) mContext).finish();
                     }
                     }
-                } catch (Exception e) {
-                    e.printStackTrace();
                 }
                 }
+            } catch (Exception e) {
+                e.printStackTrace();
             }
             }
         });
         });
 
 

+ 18 - 0
app/src/main/java/com/sheep/gamegroup/util/js/BaseActWeb.java

@@ -14,8 +14,12 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+import com.tencent.mm.opensdk.constants.ConstantsAPI;
+import com.tencent.mm.opensdk.modelpay.PayResp;
 import com.umeng.socialize.bean.SHARE_MEDIA;
 import com.umeng.socialize.bean.SHARE_MEDIA;
 
 
+import org.greenrobot.eventbus.Subscribe;
+
 import java.util.HashMap;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Map;
@@ -123,4 +127,18 @@ public abstract class BaseActWeb extends BaseUMActivity {
     protected void webViewLoadUrl(WebView webView, String url){
     protected void webViewLoadUrl(WebView webView, String url){
         WebViewCacheInterceptorInst.getInstance().loadUrl(webView,url);
         WebViewCacheInterceptorInst.getInstance().loadUrl(webView,url);
     }
     }
+
+    @Override
+    protected boolean needRegisterEventBus() {
+        return true;
+    }
+
+    @Subscribe
+    public void onEventMainThread(PayResp resp) {
+        String result = "";
+        if (resp.getType() == ConstantsAPI.COMMAND_PAY_BY_WX) {
+            result = String.valueOf(resp.errCode + 9000);//微信支付 0 为支付成功;支付宝为 "9000" 代表支付成功
+        }
+        loadJs(String.format(Locale.CHINA, "onAlipayResult('%s')", result));
+    }
 }
 }

+ 18 - 7
app/src/main/java/com/sheep/gamegroup/util/js/KFZSJs.java

@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.find.activity.ActFind;
 import com.sheep.gamegroup.module.user.activity.ActVip;
 import com.sheep.gamegroup.module.user.activity.ActVip;
 import com.sheep.gamegroup.module.user.model.BuyVipReq;
 import com.sheep.gamegroup.module.user.model.BuyVipReq;
 import com.sheep.gamegroup.module.user.model.TempUserResp;
 import com.sheep.gamegroup.module.user.model.TempUserResp;
@@ -20,6 +21,7 @@ import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.DeviceUtil;
 import com.sheep.gamegroup.util.DeviceUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.LogUtil;
+import com.sheep.gamegroup.util.MainTab;
 import com.sheep.gamegroup.util.QQUtil;
 import com.sheep.gamegroup.util.QQUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.share.ShareLinkConfig;
 import com.sheep.gamegroup.util.share.ShareLinkConfig;
@@ -96,7 +98,11 @@ public class KFZSJs {
 
 
     @JavascriptInterface
     @JavascriptInterface
     public void gotoMain(int tab) {
     public void gotoMain(int tab) {
-        Intent mainIntent = new Intent(activity, ActMain.class);
+        Class willClass = ActMain.class;
+        if(tab == MainTab.Fgt_Find.ordinal()){
+            willClass = ActFind.class;
+        }
+        Intent mainIntent = new Intent(activity, willClass);
         mainIntent.putExtra("SWITCH_TAB", tab);
         mainIntent.putExtra("SWITCH_TAB", tab);
         activity.startActivity(mainIntent);
         activity.startActivity(mainIntent);
     }
     }
@@ -273,12 +279,7 @@ public class KFZSJs {
     public void setH5Type(final String h5Type) {
     public void setH5Type(final String h5Type) {
         if (h5Type == null)
         if (h5Type == null)
             return;
             return;
-        activity.runOnUiThread(new Runnable() {
-            @Override
-            public void run() {
-                activity.setH5Type(h5Type);
-            }
-        });
+        activity.runOnUiThread(() -> activity.setH5Type(h5Type));
     }
     }
 
 
     @JavascriptInterface
     @JavascriptInterface
@@ -295,6 +296,16 @@ public class KFZSJs {
             }
             }
         });
         });
     }
     }
+    @JavascriptInterface
+    public void wxpay(String payInfo) {
+        JSONObject jsonObject = JSONObject.parseObject(payInfo);
+        LogUtil.println("KFZSJs", "wxpay", payInfo);
+        if(jsonObject == null){
+            G.showToast(R.string.please_contact_customer_service);
+            return;
+        }
+        CommonUtil.getInstance().wxpay(SheepApp.getInstance().getWxApi(), jsonObject);
+    }
 
 
     @JavascriptInterface
     @JavascriptInterface
     public void postMissionApply(int root_id) {
     public void postMissionApply(int root_id) {

+ 5 - 20
app/src/main/java/com/sheep/gamegroup/view/activity/ActAudit.java

@@ -1,11 +1,8 @@
 package com.sheep.gamegroup.view.activity;
 package com.sheep.gamegroup.view.activity;
 
 
-import android.app.Activity;
-import android.os.Bundle;
 import android.support.v4.app.Fragment;
 import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentTransaction;
 
 
-import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.absBase.BaseContainerActivity;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.view.fragment.FgtMainAudit;
 import com.sheep.gamegroup.view.fragment.FgtMainAudit;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
@@ -14,28 +11,16 @@ import com.sheep.jiuyan.samllsheep.R;
  * Created by ljy on 2018/8/16.
  * Created by ljy on 2018/8/16.
  */
  */
 
 
-public class ActAudit extends BaseActivity {
-    Activity activity;
+public class ActAudit extends BaseContainerActivity {
 
 
     @Override
     @Override
     protected int getLayoutId() {
     protected int getLayoutId() {
-        return R.layout.common_container;
+        return R.layout.common_container_nofit;
     }
     }
 
 
     @Override
     @Override
-    public void initView() {
-        activity = this;
-
+    protected Fragment initFragment() {
         int index = DataUtil.getObject(getIntent(), Integer.class);
         int index = DataUtil.getObject(getIntent(), Integer.class);
-        FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
-        Fragment fragment = getSupportFragmentManager().findFragmentByTag("tag");
-        if(fragment == null){
-            fragment = FgtMainAudit.newInstance(index);
-            transaction.add(R.id.frame_container, fragment, "tag");
-            transaction.commitAllowingStateLoss();
-        }else {
-            transaction.replace(R.id.frame_container, fragment);
-            transaction.commitAllowingStateLoss();
-        }
+        return FgtMainAudit.newInstance(index);
     }
     }
 }
 }

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

@@ -279,7 +279,7 @@ public class ActPublishArticle extends BaseActivity {
                     e.printStackTrace();
                     e.printStackTrace();
                 }
                 }
                 jsonObject.put("resource", url);
                 jsonObject.put("resource", url);
-                jsonObject.put("cover", url +"%s?vframe/jpg/offset/0");
+                jsonObject.put("cover", url +"?vframe/jpg/offset/0");
                 publishArticle(dialogProgress);
                 publishArticle(dialogProgress);
             } else {
             } else {
                 ViewUtil.setText(dialogProgress.getTextView(), "上传失败");
                 ViewUtil.setText(dialogProgress.getTextView(), "上传失败");

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

@@ -408,7 +408,7 @@ public class ActSignCard extends BaseActivity {
                 } else {
                 } else {
                     ViewUtil.showMsgDialog(activity, new DialogConfig().setMsg("抱歉,你的余额不足,请先去充值或者领取奖励,然后再来参与打卡哦!").setBtnLeftText("去领奖").setBtnRightText("去充值")
                     ViewUtil.showMsgDialog(activity, new DialogConfig().setMsg("抱歉,你的余额不足,请先去充值或者领取奖励,然后再来参与打卡哦!").setBtnLeftText("去领奖").setBtnRightText("去充值")
                             .setBtnLeftOnClickListener(view -> Jump2View.getInstance().goTryplayView(activity, null))
                             .setBtnLeftOnClickListener(view -> Jump2View.getInstance().goTryplayView(activity, null))
-                            .setBtnRightOnClickListener(view -> Jump2View.getInstance().goSignRechargeAct(activity, null)));
+                            .setBtnRightOnClickListener(view -> Jump2View.getInstance().goRechargeAct(activity, null)));
                 }
                 }
             } else {
             } else {
                 G.showToast(R.string.service_data_error);
                 G.showToast(R.string.service_data_error);

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

@@ -443,6 +443,16 @@ public class ActWebX5 extends BaseActWeb {
         ViewUtil.loadJs(mWebView, js);
         ViewUtil.loadJs(mWebView, js);
     }
     }
 
 
+    private int onResumeCount = 0;
+    @Override
+    protected void onResume() {
+        super.onResume();
+        if(onResumeCount > 0 && mWebView != null && webParams.isRefreshClick()){
+            loadJs("refreshClick()");
+        }
+        onResumeCount ++;
+    }
+
     @Override
     @Override
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {
         if (requestCode == FILECHOOSER_RESULTCODE) {
         if (requestCode == FILECHOOSER_RESULTCODE) {

+ 18 - 31
app/src/main/java/com/sheep/gamegroup/view/activity/ActXiaomiGame.java

@@ -21,6 +21,7 @@ import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.ViewHolder;
 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.AdbCommonRecycler;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -68,25 +69,16 @@ public class ActXiaomiGame extends BaseActivity {
     public void initView() {
     public void initView() {
         activity = this;
         activity = this;
         EventBus.getDefault().register(this);
         EventBus.getDefault().register(this);
+        //搜索
         TitleBarUtils.getInstance()
         TitleBarUtils.getInstance()
                 .setTitleFinish(activity)
                 .setTitleFinish(activity)
                 .setShowOrHide(this, true)
                 .setShowOrHide(this, true)
                 .setTitle(activity, "小米游戏中心")
                 .setTitle(activity, "小米游戏中心")
-                .setRightImgBotton(activity,
-                        R.drawable.search_black_img,
-                        new View.OnClickListener() {//搜索
-                            @Override
-                            public void onClick(View v) {
-                                Jump2View.getInstance().goGameSearch(activity, 1);
-                            }
-                        });
-        refresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
-            @Override
-            public void onRefresh() {
-                isRefresh = true;
-                initData();
-                refresh.setRefreshing(false);
-            }
+                .setRightImgBotton(activity, R.drawable.search_black_img, v -> Jump2View.getInstance().goGameSearch(activity, 1));
+        refresh.setOnRefreshListener(() -> {
+            isRefresh = true;
+            initData();
+            refresh.setRefreshing(false);
         });
         });
 
 
         view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
         view_list.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
@@ -112,20 +104,20 @@ public class ActXiaomiGame extends BaseActivity {
                 View rootConvertView = holder.itemView;
                 View rootConvertView = holder.itemView;
                 View task_top = rootConvertView.findViewById(R.id.task_top);
                 View task_top = rootConvertView.findViewById(R.id.task_top);
                 task_top.setVisibility(View.GONE);
                 task_top.setVisibility(View.GONE);
-                TextView item_money = (TextView)rootConvertView.findViewById(R.id.item_money);
-                TextView item_name_tv = (TextView)rootConvertView.findViewById(R.id.item_name_tv);
-                TextView item_num_tv = (TextView)rootConvertView.findViewById(R.id.item_num_tv);
-                TextView item_date_tv = (TextView)rootConvertView.findViewById(R.id.item_date_tv);
-                TextView detail_task_tv_center = (TextView)rootConvertView.findViewById(R.id.detail_task_tv_center);
+                TextView item_money = rootConvertView.findViewById(R.id.item_money);
+                TextView item_name_tv = rootConvertView.findViewById(R.id.item_name_tv);
+                TextView item_num_tv = rootConvertView.findViewById(R.id.item_num_tv);
+                TextView item_date_tv = rootConvertView.findViewById(R.id.item_date_tv);
+                TextView detail_task_tv_center = rootConvertView.findViewById(R.id.detail_task_tv_center);
                 item_money.setVisibility(View.GONE);
                 item_money.setVisibility(View.GONE);
                 View line_tv = rootConvertView.findViewById(R.id.line_tv);
                 View line_tv = rootConvertView.findViewById(R.id.line_tv);
                 View detail_task_layout = rootConvertView.findViewById(R.id.detail_task_layout);
                 View detail_task_layout = rootConvertView.findViewById(R.id.detail_task_layout);
                 detail_task_layout.setVisibility(View.GONE);
                 detail_task_layout.setVisibility(View.GONE);
 
 
-                GlideImageLoader.setGameImage((ImageView) rootConvertView.findViewById(R.id.item_icon_iv), item.getIcon());
-                item_name_tv.setText(item.getName()+"");
-                item_num_tv.setText(item.getType()+"");
-                item_date_tv.setText(DeviceIDUtil.newInstance().numberCnvert(item.getDownload_count_increment())+"人在玩");
+                GlideImageLoader.setGameImage(rootConvertView.findViewById(R.id.item_icon_iv), item.getIcon());
+                ViewUtil.setText(item_name_tv, item.getName());
+                ViewUtil.setText(item_num_tv, item.getType());
+                ViewUtil.setText(item_date_tv, DeviceIDUtil.newInstance().numberCnvert(item.getDownload_count_increment())+"人在玩");
                 detail_task_tv_center.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + item.getDownload_url());
                 detail_task_tv_center.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + item.getDownload_url());
                 detail_task_tv_center.setVisibility(View.VISIBLE);
                 detail_task_tv_center.setVisibility(View.VISIBLE);
 
 
@@ -181,12 +173,7 @@ public class ActXiaomiGame extends BaseActivity {
             loadData(false, isRefresh);
             loadData(false, isRefresh);
         }catch (Exception e){
         }catch (Exception e){
             e.printStackTrace();
             e.printStackTrace();
-            new Handler().postDelayed(new Runnable() {
-                @Override
-                public void run() {
-                    loadData(false, isRefresh);
-                }
-            }, 500);
+            new Handler().postDelayed(() -> loadData(false, isRefresh), 500);
         }
         }
 
 
 
 
@@ -216,7 +203,7 @@ public class ActXiaomiGame extends BaseActivity {
                                 if (page == 1)
                                 if (page == 1)
                                     list.clear();
                                     list.clear();
                                 CommonUtil.getInstance().updateEmptyView(empty_view, ListUtil.addAll(list, newList) == 0);
                                 CommonUtil.getInstance().updateEmptyView(empty_view, ListUtil.addAll(list, newList) == 0);
-                                view_list.getAdapter().notifyDataSetChanged();
+                                ViewUtil.notifyDataSetChanged(view_list);
                             }
                             }
                         } catch (Exception e) {
                         } catch (Exception e) {
                             CommonUtil.getInstance().updateEmptyView(empty_view, true);
                             CommonUtil.getInstance().updateEmptyView(empty_view, true);

+ 327 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/NewYearActMyMoney.java

@@ -0,0 +1,327 @@
+package com.sheep.gamegroup.view.activity;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.design.widget.TabLayout;
+import android.support.v4.app.Fragment;
+import android.support.v4.view.ViewPager;
+import android.support.v4.widget.NestedScrollView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.kfzs.duanduan.utils.NumberFormatUtils;
+import com.kfzs.duanduan.utils.StatusBarUtils;
+import com.scwang.smartrefresh.layout.SmartRefreshLayout;
+import com.scwang.smartrefresh.layout.api.RefreshLayout;
+import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.absBase.BaseRefreshLoadMoreFragment;
+import com.sheep.gamegroup.absBase.ILoadMore;
+import com.sheep.gamegroup.absBase.IRefresh;
+import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.UserAssets;
+import com.sheep.gamegroup.model.entity.WebParams;
+import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.personal.fragment.FgtRechargeBalanceLog;
+import com.sheep.gamegroup.module.personal.fragment.FgtRechargeLog;
+import com.sheep.gamegroup.module.personal.fragment.FgtWithdraw;
+import com.sheep.gamegroup.module.skin.util.SkinUtil;
+import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.RefreshUtil;
+import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
+import com.sheep.jiuyan.samllsheep.Config;
+import com.sheep.jiuyan.samllsheep.R;
+import com.sheep.jiuyan.samllsheep.SheepApp;
+import com.sheep.jiuyan.samllsheep.utils.G;
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
+
+import org.afinal.simplecache.ApiKey;
+
+import butterknife.BindView;
+import butterknife.OnClick;
+import io.reactivex.android.schedulers.AndroidSchedulers;
+import io.reactivex.schedulers.Schedulers;
+
+import static com.sheep.gamegroup.util.UMConfigUtils.Event.MY_MONEY_TAB;
+/**
+ * Created by realicing on 2019/1/28.
+ * realicing@sina.com
+ * 小绵羊3.4.10新增 -- 我的资产界面(直接修改,根本没法添加皮肤)
+ */
+public class NewYearActMyMoney extends BaseActivity {
+
+    @BindView(R.id.refresh)
+    SmartRefreshLayout refresh;
+    @BindView(R.id.scrollView)
+    NestedScrollView scrollView;
+
+    @BindView(R.id.indicator)
+    TabLayout indicator;
+    @BindView(R.id.pager)
+    ViewPager viewPager;
+
+    @BindView(R.id.my_money_total_money)
+    TextView my_money_total_money;
+    @BindView(R.id.my_money_task_reward)
+    TextView my_money_task_reward;
+    @BindView(R.id.my_money_agent_extract)
+    TextView my_money_agent_extract;
+    @BindView(R.id.my_money_recharge_amount)
+    TextView my_money_recharge_amount;
+    @BindView(R.id.my_money_available_amount)
+    TextView my_money_available_amount;
+    @BindView(R.id.my_money_dingxiang_amount)
+    TextView my_money_dingxiang_amount;
+
+    private TitleFragmentListAdapter mAdapter;
+
+    @Override
+    protected void onCreate(@Nullable Bundle savedInstanceState) {
+        StatusBarUtils.setTranslucent(this);
+        super.onCreate(savedInstanceState);
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.new_year_act_my_money;
+    }
+
+    public static final String[] tabNames = {"充值记录", "提现记录", "收支明细"};
+
+    @Override
+    public void initView() {
+        TitleBarUtils.getInstance()
+                .setTitle(this, "我的资产")
+                .setTitleFinish(this);
+        mAdapter = new TitleFragmentListAdapter(getSupportFragmentManager());
+        mAdapter.add(new FgtRechargeBalanceLog(), tabNames[0]);
+        mAdapter.add(new FgtWithdraw(), tabNames[1]);
+        mAdapter.add(new FgtRechargeLog(), tabNames[2]);
+        for (int i = 0; i < mAdapter.getCount(); i++) {
+            Fragment fragment = mAdapter.getItem(i);
+            if (fragment instanceof BaseRefreshLoadMoreFragment) {
+                ((BaseRefreshLoadMoreFragment) fragment).setSmartRefreshLayout(refresh);
+            }
+        }
+        viewPager.setOffscreenPageLimit(mAdapter.getCount());
+        viewPager.setAdapter(mAdapter);
+        viewPager.setMinimumHeight(G.HEIGHT - G.getRealPix(120));
+        new_tab();
+        //refresh
+        refresh.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
+
+            @Override
+            public void onRefresh(@NonNull RefreshLayout refreshLayout) {
+                refreshData();
+            }
+
+            @Override
+            public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
+                loadMoreData();
+            }
+        });
+        RefreshUtil.newInstance().publicParameterLoadMore(refresh, this);
+    }
+
+    private void new_tab() {
+        indicator.addTab(indicator.newTab().setCustomView(tab_icon(tabNames[0], true)));
+        indicator.addTab(indicator.newTab().setCustomView(tab_icon(tabNames[1], true)));
+        indicator.addTab(indicator.newTab().setCustomView(tab_icon(tabNames[2], false)));
+        //Tablayout自定义view绑定ViewPager
+        viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(indicator));
+        indicator.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(viewPager) {
+            private void smoothScrollView(){
+                scrollView.smoothScrollTo(0, indicator.getTop());
+            }
+            @Override
+            public void onTabReselected(TabLayout.Tab tab) {
+                super.onTabReselected(tab);
+                smoothScrollView();
+            }
+
+            @Override
+            public void onTabSelected(TabLayout.Tab tab) {
+                super.onTabSelected(tab);
+                smoothScrollView();
+            }
+        });
+        viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
+            @Override
+            public void onPageScrolled(int i, float v, int i1) {
+
+            }
+
+            @Override
+            public void onPageSelected(int i) {
+                MY_MONEY_TAB.onEvent("tab_name", tabNames[i]);
+            }
+
+            @Override
+            public void onPageScrollStateChanged(int i) {
+
+            }
+        });
+
+    }
+
+    private int refreshDataCount = 0;
+
+    //刷新数据
+    public void refreshData() {
+        refreshData(viewPager.getCurrentItem());
+    }
+
+    //刷新数据
+    public void refreshData(int position) {
+        boolean isRefresh = false;
+        if (refreshDataCount != 0) {
+            Fragment item = mAdapter.getItem(position);
+            if (item instanceof IRefresh) {//可刷新,就调用当前fragment刷新数据
+                ((IRefresh) item).refreshData();
+                isRefresh = true;
+            }
+        }
+        refreshDataCount++;
+        if (!isRefresh)
+            notifyDataSetChanged();
+    }
+
+    //加载更多数据
+    private void loadMoreData() {
+        Fragment item = mAdapter.getItem(viewPager.getCurrentItem());
+        if (item instanceof ILoadMore) {//可加载更多,就调用当前fragment刷新数据
+            ((ILoadMore) item).loadMoreData();
+        } else {
+            notifyDataSetChanged();
+        }
+    }
+
+    private void notifyDataSetChanged() {
+        if (refresh != null) {
+            refresh.finishRefresh();
+            refresh.finishLoadMore();
+        }
+    }
+
+    private View tab_icon(String name, boolean isShow) {
+        View newtab = LayoutInflater.from(this).inflate(R.layout.new_year_tab_item, null);
+        TextView tv = newtab.findViewById(R.id.tabtext);
+        View tab_line = newtab.findViewById(R.id.tab_line);
+        tab_line.setVisibility(isShow ? View.VISIBLE : View.INVISIBLE);
+        tv.setText(name);
+        return newtab;
+    }
+
+    public TitleFragmentListAdapter getmAdapter() {
+        return mAdapter;
+    }
+
+    @Override
+    public void initListener() {
+
+    }
+
+    @OnClick({R.id.my_money_withdraw_tv,
+            R.id.my_money_recharge_tv,
+            R.id.my_money_dingxiang_amount_iv,
+            R.id.my_money_dingxiang_amount,
+            R.id.my_money_dingxiang_tag})
+    public void onViewClicked(View view) {
+        switch (view.getId()) {
+            case R.id.my_money_withdraw_tv://提现
+                Jump2View.getInstance().tryGoWithdrawal(NewYearActMyMoney.this, null);
+                break;
+            case R.id.my_money_recharge_tv://充值
+                Jump2View.getInstance().goRechargeAct(NewYearActMyMoney.this, "我的资产");
+                break;
+            case R.id.my_money_dingxiang_amount_iv://定向货币详情
+            case R.id.my_money_dingxiang_amount://定向货币详情
+            case R.id.my_money_dingxiang_tag://定向货币详情
+                CommonUtil.getInstance().initUrlConfigByNet(Config.KEY_DIRECTIONAL_LIST_URL, url -> {
+                    url = url + "?authorization=" + SpUtils.getToken(this) + "&ssnocache=1";
+                    WebParams webParams = new WebParams(url, "定向消费").setShowTitle(false);
+                    Jump2View.getInstance().goWeb(this, webParams);
+                });
+                break;
+        }
+    }
+
+    @Override
+    public void initData() {
+        showProgress();
+        resetData();
+        SheepApp.getInstance().getNetComponent().getApiService().getMyAssets()
+                .subscribeOn(Schedulers.io())
+                .observeOn(AndroidSchedulers.mainThread())
+                .subscribe(new SheepSubscriber<BaseMessage>(this) {
+                    @Override
+                    public void onNext(BaseMessage baseMessage) {
+                        boolean isNewData = DataUtil.getInstance().isNewData(ApiKey.MY_ASSETS);
+                        if (isNewData) {
+                            CommonUtil.getInstance().updateUserInfo(null);
+                        }
+                        UserAssets userAssets = baseMessage.getData(UserAssets.class);
+
+                        loadData(userAssets);
+                        hideProgress();
+                    }
+
+                    @Override
+                    public void onError(BaseMessage baseMessage) {
+                        G.showToast(baseMessage);
+                        resetData();
+                        hideProgress();
+                    }
+                });
+    }
+
+    private void loadData(UserAssets userAssets) {
+        if (my_money_total_money == null) {
+            return;
+        }
+        my_money_total_money.setText(getString(R.string.total_money, NumberFormatUtils.retainMost2W(userAssets.getSheep_bi_total())));
+        my_money_task_reward.setText(getString(R.string.total_money, NumberFormatUtils.retainMost2W(userAssets.getTask_reward())));
+        my_money_agent_extract.setText(getString(R.string.total_money, NumberFormatUtils.retainMost2W(userAssets.getExtension_extract())));
+        my_money_recharge_amount.setText(getString(R.string.total_money, NumberFormatUtils.retainMost2W(userAssets.getRecharge_amount())));
+        my_money_available_amount.setText(getString(R.string.available_amount, NumberFormatUtils.retainMost2W(userAssets.getCash_withdrawal())));
+        my_money_dingxiang_amount.setText(getString(R.string.total_money, NumberFormatUtils.retainMost2W(userAssets.getDirectional_currency())));
+    }
+
+    private void resetData() {
+        if (my_money_total_money == null) {
+            return;
+        }
+        my_money_total_money.setText(getString(R.string.total_money, "0.00"));
+        my_money_task_reward.setText(getString(R.string.total_money, "0.00"));
+        my_money_agent_extract.setText(getString(R.string.total_money, "0.00"));
+        my_money_recharge_amount.setText(getString(R.string.total_money, "0.00"));
+        my_money_available_amount.setText(getString(R.string.available_amount, "0.00"));
+        my_money_dingxiang_amount.setText(getString(R.string.total_money, "0.00"));
+    }
+
+    //点击优惠购物
+    public void onClickCoupons(View view) {
+        Jump2View.getInstance().gotoYfShop(this);
+    }
+
+    //点击VIP
+    public void onClickVip(View view) {
+        Jump2View.getInstance().gotoVip(this);
+    }
+
+    //点击游戏直充
+    public void onClickGameRecharge(View view) {
+        Jump2View.getInstance().goGameRecharge(this, null);
+    }
+
+    //点击龙猫电竞
+    public void onClickLongMao(View view) {
+        Jump2View.getInstance().gotoLongMao(this);
+    }
+}

+ 165 - 136
app/src/main/java/com/sheep/gamegroup/view/activity/RechargeAct.java

@@ -1,22 +1,31 @@
 package com.sheep.gamegroup.view.activity;
 package com.sheep.gamegroup.view.activity;
 
 
+import android.content.Context;
 import android.content.Intent;
 import android.content.Intent;
+import android.support.v4.content.ContextCompat;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
 import android.view.View;
 import android.view.View;
-import android.widget.AdapterView;
 import android.widget.EditText;
 import android.widget.EditText;
+import android.widget.TextView;
 
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
-import com.alipay.sdk.app.PayTask;
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.sheep.gamegroup.absBase.AbsObserver;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.BaseActivity;
-import com.sheep.gamegroup.alipay.PayResult;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.RechargeEntity;
 import com.sheep.gamegroup.model.entity.RechargeEntity;
 import com.sheep.gamegroup.model.entity.RechargePriceEntity;
 import com.sheep.gamegroup.model.entity.RechargePriceEntity;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
+import com.sheep.gamegroup.module.user.activity.ActVip;
+import com.sheep.gamegroup.util.ApiJSONUtil;
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.Jump2View;
+import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.MyGridview;
 import com.sheep.gamegroup.util.MyGridview;
-import com.sheep.gamegroup.view.adapter.RechargeAdapter;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.RechargePriceAdapter;
 import com.sheep.gamegroup.view.adapter.RechargePriceAdapter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.SheepApp;
@@ -25,6 +34,7 @@ import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
+import java.util.Locale;
 
 
 import butterknife.BindView;
 import butterknife.BindView;
 import butterknife.OnClick;
 import butterknife.OnClick;
@@ -40,25 +50,23 @@ import static com.sheep.gamegroup.util.UMConfigUtils.Event.RECHARGE_PAY;
 
 
 public class RechargeAct extends BaseActivity {
 public class RechargeAct extends BaseActivity {
 
 
-    int mPayType = -1;//选择支付方式的id
-    String mAmount = null;//支付的金额
-
-    private boolean forResult = false;
 
 
     @BindView(R.id.rechargeprice_greidview)
     @BindView(R.id.rechargeprice_greidview)
     MyGridview rechargeprice_greidview;
     MyGridview rechargeprice_greidview;
-    @BindView(R.id.recharge_greidview)
-    MyGridview rechargeGreidview;
-
-    RechargePriceAdapter rechargePriceAdapter;
-    List<RechargePriceEntity> mPriceEntityList = new ArrayList<>();
-    int select = -1;
-
-    RechargeAdapter rechargeAdapter;
+    @BindView(R.id.act_ral_pay_type_rv)
+    RecyclerView act_ral_pay_type_rv;
     @BindView(R.id.et_recharge_price)
     @BindView(R.id.et_recharge_price)
     EditText etRechargePrice;
     EditText etRechargePrice;
 
 
 
 
+    private RechargePriceAdapter rechargePriceAdapter;
+    private List<RechargePriceEntity> mPriceEntityList = new ArrayList<>();
+
+    private int mPayType = -1;//选择支付方式的id
+    private int payTypePosition = -1;//选择支付方式的位置
+    private String mAmount = null;//支付的金额
+    private boolean forResult = false;
+
     @Override
     @Override
     protected int getLayoutId() {
     protected int getLayoutId() {
         return R.layout.recharge_act_layout;
         return R.layout.recharge_act_layout;
@@ -88,76 +96,59 @@ public class RechargeAct extends BaseActivity {
         rechargePriceAdapter = new RechargePriceAdapter(RechargeAct.this, mPriceEntityList);
         rechargePriceAdapter = new RechargePriceAdapter(RechargeAct.this, mPriceEntityList);
         rechargeprice_greidview.setVerticalSpacing(20);
         rechargeprice_greidview.setVerticalSpacing(20);
         rechargeprice_greidview.setAdapter(rechargePriceAdapter);
         rechargeprice_greidview.setAdapter(rechargePriceAdapter);
-        rechargeprice_greidview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                select = position;
-                rechargePriceAdapter.setInPut(false);
-                RechargePriceEntity rechargePriceEntity = (RechargePriceEntity) parent.getItemAtPosition(position);
-                etRechargePrice.setText("" + rechargePriceEntity.getPrice());
-                for (int i = 0; i < mPriceEntityList.size(); i++) {
-                    if (position == i) {
-                        mPriceEntityList.get(i).setSelectState(true);
-                    } else {
-                        mPriceEntityList.get(i).setSelectState(false);
-                    }
+        rechargeprice_greidview.setOnItemClickListener((parent, view, position, id) -> {
+            rechargePriceAdapter.setInPut(false);
+            RechargePriceEntity rechargePriceEntity = (RechargePriceEntity) parent.getItemAtPosition(position);
+            ViewUtil.setText(etRechargePrice, rechargePriceEntity.getPrice());
+            for (int i = 0; i < mPriceEntityList.size(); i++) {
+                if (position == i) {
+                    mPriceEntityList.get(i).setSelectState(true);
+                } else {
+                    mPriceEntityList.get(i).setSelectState(false);
                 }
                 }
-                rechargePriceAdapter.notifyDataSetChanged();
-
             }
             }
+            rechargePriceAdapter.notifyDataSetChanged();
+
         });
         });
 
 
 
 
         /*
         /*
           支付方式选择
           支付方式选择
          */
          */
-        rechargeAdapter = new RechargeAdapter(RechargeAct.this);
-        rechargeGreidview.setVerticalSpacing(40);
-        rechargeGreidview.setAdapter(rechargeAdapter);
-        rechargeGreidview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
+        BaseQuickAdapter<RechargeEntity, BaseViewHolder> rechargeAdapter = new BaseQuickAdapter<RechargeEntity, BaseViewHolder>(R.layout.recharge_gridview_item, rechargeEntityList){
+
             @Override
             @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                RechargeEntity rechargeEntity = (RechargeEntity) parent.getItemAtPosition(position);
-                mPayType = rechargeEntity.getId();
-                rechargeAdapter.setSelect(position);
-                rechargeAdapter.notifyDataSetChanged();
-            }
-        });
+            protected void convert(BaseViewHolder helper, RechargeEntity item) {
+                int position = helper.getAdapterPosition();
 
 
-//        etRechargePrice.addTextChangedListener(new TextWatcher() {
-//            @Override
-//            public void beforeTextChanged(CharSequence s, int start, int count, int after) {
-//
-//            }
-//
-//            @Override
-//            public void onTextChanged(CharSequence s, int start, int before, int count) {
-//                    if(TextUtils.isEmpty(s)){
-//                        rechargePriceAdapter.setInPut(false);
-//                    }else{
-//                        boolean input = true;
-//                        for(RechargePriceEntity priceEntityList : mPriceEntityList){
-//                            int price = Integer.valueOf(s.toString());
-//                            if(price == priceEntityList.getPrice()){
-//                                input = false;
-//                                break;
-//                            }
-//                        }
-//                        rechargePriceAdapter.setInPut(input);
-//                    }
-//            }
-//
-//            @Override
-//            public void afterTextChanged(Editable s) {
-//
-//            }
-//        });
+                TextView tv_pay = helper.getView(R.id.tv_pay);
 
 
+                ViewUtil.setText(tv_pay, item.getName());
+                Context context = SheepApp.getInstance();
+                if (position == payTypePosition){
+                    tv_pay.setBackground(context.getResources().getDrawable(R.drawable.layer_list_check_rectgangle_small));
+                    tv_pay.setTextColor(ContextCompat.getColor(context,R.color.main_tab_activated));
+                }else{
+                    tv_pay.setBackground(context.getResources().getDrawable(R.drawable.btn_main_stroke_no_check_small));
+                    tv_pay.setTextColor(ContextCompat.getColor(context,R.color.main_tab));
+
+                }
+                //这里点击
+                tv_pay.setOnClickListener(view -> {
+                    payTypePosition = position;
+                    mPayType = item.getId();
+                    ViewUtil.notifyDataSetChanged(act_ral_pay_type_rv);
+                });
+            }
+        };
+        act_ral_pay_type_rv.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
+        rechargeAdapter.bindToRecyclerView(act_ral_pay_type_rv);
 
 
         showProgress();
         showProgress();
         getRechargePayway();
         getRechargePayway();
     }
     }
 
 
+    private List<RechargeEntity> rechargeEntityList = new ArrayList<>();
     private void getRechargePayway() {
     private void getRechargePayway() {
         // 参数 1:没有绵羊币的,2:是全部
         // 参数 1:没有绵羊币的,2:是全部
         SheepApp.getInstance().getNetComponent().getApiService().getRechargePayway("1")
         SheepApp.getInstance().getNetComponent().getApiService().getRechargePayway("1")
@@ -168,22 +159,19 @@ public class RechargeAct extends BaseActivity {
                     public void onNext(BaseMessage baseMessage) {
                     public void onNext(BaseMessage baseMessage) {
                         hideProgress();
                         hideProgress();
                         List<RechargeEntity> list = baseMessage.getDatas(RechargeEntity.class);
                         List<RechargeEntity> list = baseMessage.getDatas(RechargeEntity.class);
-                        if (list != null && list.size() > 0) {
-                            mPayType = list.get(0).getId();
-                            rechargeAdapter.setSelect(0);
-                        }
-                        rechargeAdapter.addAll(list);
-                        if (!list.isEmpty()) {
-                            mPayType = list.get(0).getId();
-                            rechargeAdapter.setSelect(0);
-                            rechargeAdapter.notifyDataSetChanged();
+                        if (!ListUtil.isEmpty(list)) {
+                            payTypePosition = 0;
+                            mPayType = list.get(payTypePosition).getId();
+                            rechargeEntityList.clear();
+                            rechargeEntityList.addAll(list);
+                            ViewUtil.notifyDataSetChanged(act_ral_pay_type_rv);
                         }
                         }
                     }
                     }
 
 
                     @Override
                     @Override
                     public void onError(BaseMessage baseMessage) {
                     public void onError(BaseMessage baseMessage) {
                         hideProgress();
                         hideProgress();
-                        G.showToast(baseMessage.getMsg() + "");
+                        G.showToast(baseMessage);
                     }
                     }
                 });
                 });
     }
     }
@@ -199,7 +187,15 @@ public class RechargeAct extends BaseActivity {
                     @Override
                     @Override
                     public void onNext(BaseMessage baseMessage) {
                     public void onNext(BaseMessage baseMessage) {
                         hideProgress();
                         hideProgress();
-                        pay(baseMessage.getData().toString());
+                        String payInfo = baseMessage.getData().toString();
+                        switch (mPayType){
+                            case 1:
+                                tryAliPay(payInfo);
+                                break;
+                            case 2:
+                                tryWxPay(baseMessage);
+                                break;
+                        }
                     }
                     }
 
 
                     @Override
                     @Override
@@ -210,6 +206,16 @@ public class RechargeAct extends BaseActivity {
                 });
                 });
     }
     }
 
 
+    private void tryWxPay(BaseMessage baseMessage) {
+        JSONObject jsonObject = baseMessage.getData(JSONObject.class);
+        if(jsonObject == null){
+            G.showToast(R.string.please_contact_customer_service);
+            return;
+        }
+        CommonUtil.getInstance().wxpay(SheepApp.getInstance().getWxApi(), jsonObject);
+        finish();
+    }
+
     @OnClick({R.id.tv_recharge_pay})
     @OnClick({R.id.tv_recharge_pay})
     public void onViewClicked(View view) {
     public void onViewClicked(View view) {
         switch (view.getId()) {
         switch (view.getId()) {
@@ -234,64 +240,87 @@ public class RechargeAct extends BaseActivity {
         }
         }
     }
     }
 
 
-    private void pay(final String payInfo) {
-        Runnable payRunnable = new Runnable() {
-
+    private void tryAliPay(final String payInfo) {
+        CommonUtil.getInstance().alipay(this, payInfo, true, new AbsObserver<String>() {
             @Override
             @Override
-            public void run() {
-                // 构造PayTask 对象
-                PayTask alipay = new PayTask(RechargeAct.this);
-                // 调用支付接口,获取支付结果
-                final String result = alipay.pay(payInfo, true);
-
-                runOnUiThread(new Runnable() {
-
-                    @Override
-                    public void run() {
-
-                        PayResult payResult = new PayResult(result);
-                        /*
-                          同步返回的结果必须放置到服务端进行验证(验证的规则请看https://doc.open.alipay.com/doc2/
-                          detail.htm?spm=0.0.0.0.xdvAU6&treeId=59&articleId=103665&
-                          docType=1) 建议商户依赖异步通知
-                         */
-//						String resultInfo = payResult.getResult();// 同步返回需要验证的信息
-
-                        String resultStatus = payResult.getResultStatus();
-                        if ("9000".equals(resultStatus)) {
-                            JSONObject json = new JSONObject();
-                            json.put("act", 4);
-                            SheepApp.getInstance().getNetComponent().getApiService()
-                                    .missionExecute(json)
-                                    .subscribeOn(Schedulers.io())
-                                    .observeOn(AndroidSchedulers.mainThread())
-                                    .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
-                                        @Override
-                                        public void onError(BaseMessage baseMessage) {
-                                            LogUtil.logE(baseMessage.getErrorMsg() + " " + baseMessage.getMsg());
-                                        }
-
-                                        @Override
-                                        public void onNext(BaseMessage baseMessage) {
-                                        }
-                                    });
-                        }
-                        if (forResult && "9000".equals(resultStatus)) {
-                            Intent intent = new Intent();
-                            intent.putExtra("amount", Integer.parseInt(mAmount));
-                            setResult(777, intent);
-                        } else {
-                            Jump2View.getInstance().goRechargeResultAct(RechargeAct.this, resultStatus);
-                        }
-                        finish();
-                    }
-                });
+            public void onNext(String result) {
+                LogUtil.println(ActVip.class.getSimpleName(), String.format(Locale.CHINA, "alipay onNext('%s')", result));
+                if ("9000".equals(result)) {
+                    ApiJSONUtil.missionExecute(4);
+                }
+                if (forResult && "9000".equals(result)) {
+                    Intent intent = new Intent();
+                    intent.putExtra("amount", Integer.parseInt(mAmount));
+                    setResult(777, intent);
+                } else {
+                    Jump2View.getInstance().goRechargeResultAct(RechargeAct.this, result);
+                }
+                finish();
             }
             }
-        };
 
 
-        // 必须异步调用
-        Thread payThread = new Thread(payRunnable);
-        payThread.start();
+            @Override
+            public void onError(Throwable e) {
+                G.showToast(e);
+                LogUtil.println(ActVip.class.getSimpleName(), String.format(Locale.CHINA, "alipay onError('%s')", e.getMessage()));
+            }
+        });
+//        Runnable payRunnable = new Runnable() {
+//
+//            @Override
+//            public void run() {
+//                // 构造PayTask 对象
+//                PayTask alipay = new PayTask(RechargeAct.this);
+//                // 调用支付接口,获取支付结果
+//                final String result = alipay.tryAliPay(payInfo, true);
+//
+//                runOnUiThread(new Runnable() {
+//
+//                    @Override
+//                    public void run() {
+//
+//                        PayResult payResult = new PayResult(result);
+//                        /*
+//                          同步返回的结果必须放置到服务端进行验证(验证的规则请看https://doc.open.alipay.com/doc2/
+//                          detail.htm?spm=0.0.0.0.xdvAU6&treeId=59&articleId=103665&
+//                          docType=1) 建议商户依赖异步通知
+//                         */
+////						String resultInfo = payResult.getResult();// 同步返回需要验证的信息
+//
+//                        String resultStatus = payResult.getResultStatus();
+//                        if ("9000".equals(resultStatus)) {
+//                            JSONObject json = new JSONObject();
+//                            json.put("act", 4);
+//                            SheepApp.getInstance().getNetComponent().getApiService()
+//                                    .missionExecute(json)
+//                                    .subscribeOn(Schedulers.io())
+//                                    .observeOn(AndroidSchedulers.mainThread())
+//                                    .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+//                                        @Override
+//                                        public void onError(BaseMessage baseMessage) {
+//                                            LogUtil.logE(baseMessage.getErrorMsg() + " " + baseMessage.getMsg());
+//                                        }
+//
+//                                        @Override
+//                                        public void onNext(BaseMessage baseMessage) {
+//                                        }
+//                                    });
+//                        }
+//                        if (forResult && "9000".equals(resultStatus)) {
+//                            Intent intent = new Intent();
+//                            intent.putExtra("amount", Integer.parseInt(mAmount));
+//                            setResult(777, intent);
+//                        } else {
+//                            Jump2View.getInstance().goRechargeResultAct(RechargeAct.this, resultStatus);
+//                        }
+//                        finish();
+//                    }
+//                });
+//            }
+//        };
+//
+//        // 必须异步调用
+//        Thread payThread = new Thread(payRunnable);
+//        payThread.start();
     }
     }
 
 
     private void addDatas() {
     private void addDatas() {

+ 2 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/RechargeResultAct.java

@@ -4,6 +4,7 @@ import android.text.TextUtils;
 import android.widget.TextView;
 import android.widget.TextView;
 
 
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.util.DrawablesHelper;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
 
@@ -41,6 +42,7 @@ public class RechargeResultAct extends BaseActivity {
                     .setTitle(this, "交易失败")
                     .setTitle(this, "交易失败")
                     .setTitleFinish(this);
                     .setTitleFinish(this);
             tvRechargeResultState.setText("交易失败");
             tvRechargeResultState.setText("交易失败");
+            new DrawablesHelper(tvRechargeResultState).direction(DrawablesHelper.LEFT).drawable(R.mipmap.delete_x_red_img).commit();
         }
         }
     }
     }
 
 

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

@@ -282,7 +282,7 @@ public class SignCardAct extends BaseActivity implements SignCardContract.View {
                     .setBtnLeftOnClickListener(new View.OnClickListener() {
                     .setBtnLeftOnClickListener(new View.OnClickListener() {
                         @Override
                         @Override
                         public void onClick(View view) {
                         public void onClick(View view) {
-                            Jump2View.getInstance().goSignRechargeAct(activity, null);
+                            Jump2View.getInstance().goRechargeAct(activity, null);
                         }
                         }
                     }));
                     }));
         }
         }

+ 0 - 242
app/src/main/java/com/sheep/gamegroup/view/activity/SignRechargeAct.java

@@ -1,242 +0,0 @@
-package com.sheep.gamegroup.view.activity;
-
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.EditText;
-
-import com.alibaba.fastjson.JSONObject;
-import com.alipay.sdk.app.PayTask;
-import com.sheep.gamegroup.absBase.BaseActivity;
-import com.sheep.gamegroup.alipay.PayResult;
-import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.RechargeEntity;
-import com.sheep.gamegroup.model.entity.RechargePriceEntity;
-import com.sheep.gamegroup.model.util.SheepSubscriber;
-import com.sheep.gamegroup.util.Jump2View;
-import com.sheep.gamegroup.util.MyGridview;
-import com.sheep.gamegroup.view.adapter.RechargeAdapter;
-import com.sheep.gamegroup.view.adapter.RechargePriceAdapter;
-import com.sheep.jiuyan.samllsheep.R;
-import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
-import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import butterknife.BindView;
-import butterknife.OnClick;
-import io.reactivex.android.schedulers.AndroidSchedulers;
-import io.reactivex.schedulers.Schedulers;
-
-/**
- * Created by Administrator on 2018/3/19.
- * 充值界面
- */
-
-public class SignRechargeAct extends BaseActivity {
-
-    int mPayType = -1;//选择支付方式的id
-    String mAmount = null;//支付的金额
-
-    @BindView(R.id.rechargeprice_greidview)
-    MyGridview rechargeprice_greidview;
-    @BindView(R.id.recharge_greidview)
-    MyGridview rechargeGreidview;
-
-    RechargeAdapter rechargeAdapter;
-    @BindView(R.id.et_recharge_price)
-    EditText etRechargePrice;
-
-    RechargePriceAdapter rechargePriceAdapter;
-    List<RechargePriceEntity> mPriceEntityList = new ArrayList<>();
-    int select = -1;
-
-    @Override
-    protected int getLayoutId() {
-        return R.layout.recharge_act_layout;
-    }
-
-    @Override
-    public void initView() {
-        TitleBarUtils.getInstance()
-                .setTitle(this, "充值")
-                .setShowOrHide(this, true)
-                .setTitleFinish(this);
-    }
-
-    @Override
-    public void initListener() {
-    }
-
-    @Override
-    public void initData() {
-
-        addDatas();
-        /*
-          支付金额选择
-         */
-        rechargePriceAdapter = new RechargePriceAdapter(SignRechargeAct.this, mPriceEntityList);
-        rechargeprice_greidview.setVerticalSpacing(20);
-        rechargeprice_greidview.setAdapter(rechargePriceAdapter);
-        rechargeprice_greidview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                select = position;
-                rechargePriceAdapter.setInPut(false);
-                RechargePriceEntity rechargePriceEntity = (RechargePriceEntity) parent.getItemAtPosition(position);
-                etRechargePrice.setText("" + rechargePriceEntity.getPrice());
-                for (int i = 0; i < mPriceEntityList.size(); i++) {
-                    if (position == i) {
-                        mPriceEntityList.get(i).setSelectState(true);
-                    } else {
-                        mPriceEntityList.get(i).setSelectState(false);
-                    }
-                }
-                rechargePriceAdapter.notifyDataSetChanged();
-
-            }
-        });
-
-        /*
-          支付方式选择
-         */
-        rechargeAdapter = new RechargeAdapter(SignRechargeAct.this);
-        rechargeGreidview.setVerticalSpacing(40);
-        rechargeGreidview.setAdapter(rechargeAdapter);
-        rechargeGreidview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
-            @Override
-            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
-                RechargeEntity rechargeEntity = (RechargeEntity) parent.getItemAtPosition(position);
-                mPayType = rechargeEntity.getId();
-                rechargeAdapter.setSelect(position);
-                rechargeAdapter.notifyDataSetChanged();
-            }
-        });
-
-
-        showProgress();
-        getRechargePayway();
-    }
-
-    private void getRechargePayway() {
-        // 参数 1:没有绵羊币的,2:是全部
-        SheepApp.getInstance().getNetComponent().getApiService().getRechargePayway("1")
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SignRechargeAct.this) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        hideProgress();
-                        List<RechargeEntity> list = baseMessage.getDatas(RechargeEntity.class);
-                        if(list != null && list.size() > 0){
-                            mPayType = list.get(0).getId();
-                            rechargeAdapter.setSelect(0);
-                        }
-                        rechargeAdapter.addAll(list);
-                        if(!list.isEmpty()) {
-                            mPayType = list.get(0).getId();
-                            rechargeAdapter.setSelect(0);
-                            rechargeAdapter.notifyDataSetChanged();
-                        }
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        hideProgress();
-                        G.showToast(baseMessage.getMsg() + "");
-                    }
-                });
-    }
-
-    private void getRechargeBalance() {
-        JSONObject jsonObject = new JSONObject();
-        jsonObject.put("Amount", Float.valueOf(mAmount));
-        jsonObject.put("PayType", mPayType);
-        SheepApp.getInstance().getNetComponent().getApiService().getRechargeBalance(jsonObject)
-                .subscribeOn(Schedulers.io())
-                .observeOn(AndroidSchedulers.mainThread())
-                .subscribe(new SheepSubscriber<BaseMessage>(SignRechargeAct.this) {
-                    @Override
-                    public void onNext(BaseMessage baseMessage) {
-                        hideProgress();
-                        pay(baseMessage.getData().toString());
-                    }
-
-                    @Override
-                    public void onError(BaseMessage baseMessage) {
-                        hideProgress();
-                        G.showToast(baseMessage.getMsg() + "");
-                    }
-                });
-    }
-
-    @OnClick({R.id.tv_recharge_pay})
-    public void onViewClicked(View view) {
-        switch (view.getId()) {
-
-            case R.id.tv_recharge_pay:
-                if (mPayType == -1) {
-                    G.showToast("请选择支付方式");
-                    return;
-                }
-
-                mAmount = etRechargePrice.getText().toString().trim();
-                if(android.text.TextUtils.isEmpty(mAmount)){
-                    G.showToast("请输入充值金额");
-                    return;
-                }
-
-
-                showProgress();
-                getRechargeBalance();
-                break;
-        }
-    }
-
-    private void pay(final String payInfo) {
-        Runnable payRunnable = new Runnable() {
-
-            @Override
-            public void run() {
-                // 构造PayTask 对象
-                PayTask alipay = new PayTask(SignRechargeAct.this);
-                // 调用支付接口,获取支付结果
-                final String result = alipay.pay(payInfo, true);
-
-                runOnUiThread(new Runnable() {
-
-                    @Override
-                    public void run() {
-
-                        PayResult payResult = new PayResult(result);
-                        /*
-                          同步返回的结果必须放置到服务端进行验证(验证的规则请看https://doc.open.alipay.com/doc2/
-                          detail.htm?spm=0.0.0.0.xdvAU6&treeId=59&articleId=103665&
-                          docType=1) 建议商户依赖异步通知
-                         */
-//						String resultInfo = payResult.getResult();// 同步返回需要验证的信息
-
-                        String resultStatus = payResult.getResultStatus();
-                        Jump2View.getInstance().goRechargeResultAct(SignRechargeAct.this, resultStatus);
-                        finish();
-                    }
-                });
-            }
-        };
-
-        // 必须异步调用
-        Thread payThread = new Thread(payRunnable);
-        payThread.start();
-    }
-
-
-    private void addDatas() {
-        mPriceEntityList.add(new RechargePriceEntity(false,"10元", 10));
-        mPriceEntityList.add(new RechargePriceEntity(false,"20元", 20));
-        mPriceEntityList.add(new RechargePriceEntity(false,"50元", 50));
-        mPriceEntityList.add(new RechargePriceEntity(false,"100元", 100));
-        mPriceEntityList.add(new RechargePriceEntity(false,"200元", 200));
-        mPriceEntityList.add(new RechargePriceEntity(false,"500元", 500));
-    }
-}

+ 155 - 185
app/src/main/java/com/sheep/gamegroup/view/adapter/TryMakeMoneyAdp.java

@@ -19,15 +19,14 @@ import com.kfzs.duanduan.utils.ApkUtils;
 import com.sheep.gamegroup.event.BigEvent;
 import com.sheep.gamegroup.event.BigEvent;
 import com.sheep.gamegroup.event.EventTypes;
 import com.sheep.gamegroup.event.EventTypes;
 import com.sheep.gamegroup.greendao.download.DownLoadInfo;
 import com.sheep.gamegroup.greendao.download.DownLoadInfo;
-import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GameAgencyRechargePlatformEntity;
 import com.sheep.gamegroup.model.entity.GameAgencyRechargePlatformEntity;
 import com.sheep.gamegroup.model.entity.OrienteeringDetail;
 import com.sheep.gamegroup.model.entity.OrienteeringDetail;
 import com.sheep.gamegroup.model.entity.PayEntity;
 import com.sheep.gamegroup.model.entity.PayEntity;
 import com.sheep.gamegroup.model.entity.RecyleObj;
 import com.sheep.gamegroup.model.entity.RecyleObj;
 import com.sheep.gamegroup.model.entity.RecyleType;
 import com.sheep.gamegroup.model.entity.RecyleType;
+import com.sheep.gamegroup.model.entity.Release_task;
 import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
 import com.sheep.gamegroup.model.entity.TaskAcceptedEty;
 import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.entity.TaskEty;
-import com.sheep.gamegroup.model.entity.Release_task;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
 import com.sheep.gamegroup.presenter.TryMakeMoneyPresenter;
 import com.sheep.gamegroup.presenter.TryMakeMoneyPresenter;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.CommonUtil;
@@ -70,9 +69,9 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
     /**
     /**
      * List view item text view tag
      * List view item text view tag
      */
      */
-    public static final String PUBLIC_TAG_PREFIX_TEXTVIEW_LIST   = "PUBLIC_TAG_PREFIX_TEXTVIEW_LIST";
+    public static final String PUBLIC_TAG_PREFIX_TEXTVIEW_LIST = "PUBLIC_TAG_PREFIX_TEXTVIEW_LIST";
     private final static int TAG_ID_TEMP = R.id.view_tag_1;
     private final static int TAG_ID_TEMP = R.id.view_tag_1;
-    private HashMap<View, SelfCountDownTimer> timerHashMap= new HashMap<>();
+    private HashMap<View, SelfCountDownTimer> timerHashMap = new HashMap<>();
     @Inject
     @Inject
     TryMakeMoneyPresenter presenter;
     TryMakeMoneyPresenter presenter;
     private int from;// 1 来自主页
     private int from;// 1 来自主页
@@ -83,6 +82,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
     public TryMakeMoneyAdp(Context context) {
     public TryMakeMoneyAdp(Context context) {
         super(context);
         super(context);
     }
     }
+
     public TryMakeMoneyAdp(Context context, int from) {
     public TryMakeMoneyAdp(Context context, int from) {
         super(context);
         super(context);
         this.from = from;
         this.from = from;
@@ -92,7 +92,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
     public int getViewIdByType(int type) {
     public int getViewIdByType(int type) {
         int resId = R.layout.empty;
         int resId = R.layout.empty;
         RecyleType recyleType = RecyleType.values()[type];
         RecyleType recyleType = RecyleType.values()[type];
-        switch (recyleType){
+        switch (recyleType) {
             case RELEASE_TASK:
             case RELEASE_TASK:
             case BEGIN_TASK:
             case BEGIN_TASK:
             case RUN_TASK:
             case RUN_TASK:
@@ -107,7 +107,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
 
 
     @Override
     @Override
     public void convert(ViewHolder holder, RecyleObj recyleObj) {
     public void convert(ViewHolder holder, RecyleObj recyleObj) {
-        switch (recyleObj.getRecyleType()){
+        switch (recyleObj.getRecyleType()) {
             case RELEASE_TASK:
             case RELEASE_TASK:
                 bindReleaseTask(holder, (List<Release_task>) recyleObj.getDataObj(), 0);
                 bindReleaseTask(holder, (List<Release_task>) recyleObj.getDataObj(), 0);
                 break;
                 break;
@@ -134,31 +134,36 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
     public int getItemViewType(int position) {
     public int getItemViewType(int position) {
         return listData.get(position).getRecyleType().ordinal();
         return listData.get(position).getRecyleType().ordinal();
     }
     }
+
     /**
     /**
      * 传入presenter
      * 传入presenter
      */
      */
-    public void addPresenter(TryMakeMoneyPresenter presenter){
+    public void addPresenter(TryMakeMoneyPresenter presenter) {
         this.presenter = presenter;
         this.presenter = presenter;
     }
     }
+
     /**
     /**
      * 传入type
      * 传入type
      */
      */
-    public void addType(int type){
+    public void addType(int type) {
         this.type = type;
         this.type = type;
     }
     }
-    public void addShowType(String show_type){
+
+    public void addShowType(String show_type) {
         this.show_type = show_type;
         this.show_type = show_type;
     }
     }
+
     /**
     /**
      * 传入is_succession
      * 传入is_succession
      */
      */
-    public void setIs_succession(int is_succession){
+    public void setIs_succession(int is_succession) {
         this.is_succession = is_succession;
         this.is_succession = is_succession;
     }
     }
 
 
 
 
     /**
     /**
      * 我的游戏
      * 我的游戏
+     *
      * @param holder
      * @param holder
      * @param etyList
      * @param etyList
      */
      */
@@ -184,44 +189,38 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
             @Override
             @Override
             public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, final int i) {
             public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, final int i) {
                 final OrienteeringDetail item = ListUtil.getItem(etyList, i);
                 final OrienteeringDetail item = ListUtil.getItem(etyList, i);
-                if(item == null){
+                if (item == null) {
                     return;
                     return;
                 }
                 }
                 viewHolder.itemView.setTag(TAG_ID_TEMP, item.getId());
                 viewHolder.itemView.setTag(TAG_ID_TEMP, item.getId());
                 TextView detail_task_tv = viewHolder.itemView.findViewById(R.id.detail_task_tv);
                 TextView detail_task_tv = viewHolder.itemView.findViewById(R.id.detail_task_tv);
                 viewHolder.itemView.findViewById(R.id.task_top).setVisibility(View.GONE);
                 viewHolder.itemView.findViewById(R.id.task_top).setVisibility(View.GONE);
 
 
-                if(i == getItemCount()-1){
+                if (i == getItemCount() - 1) {
                     viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.GONE);
                     viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.GONE);
-                }else {
+                } else {
                     viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.VISIBLE);
                     viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.VISIBLE);
                 }
                 }
                 detail_task_tv.setText("去充值");
                 detail_task_tv.setText("去充值");
-                ((TextView)viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
-                        "可定向消费:" + item.getBalance() +"元");
-                ((TextView)viewHolder.itemView.findViewById(R.id.item_date_tv)).setTextColor(context.getResources().getColor(R.color.red_fd2d54));
+                ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
+                        "可定向消费:" + item.getBalance() + "元");
+                ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setTextColor(context.getResources().getColor(R.color.red_fd2d54));
                 viewHolder.itemView.findViewById(R.id.item_date_question_img).setVisibility(View.VISIBLE);
                 viewHolder.itemView.findViewById(R.id.item_date_question_img).setVisibility(View.VISIBLE);
-                viewHolder.itemView.findViewById(R.id.item_date_question_img).setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-
-                        ViewUtil.showMsgDialog(context,
-                                "游戏总金额"+ item.getBalance() +"元,按比例"+ item.getRatio() +"%进行消费,最低消费"+ item.getMin_amount() +"元。\n" +
-                                        "\n" +
-                                        "例如(消费100元可用"+ item.getRatio() +"元小绵羊定向消费金额)",
-                                "定向消费详情",
-                                false);
-                    }
-                });
+                viewHolder.itemView.findViewById(R.id.item_date_question_img).setOnClickListener(v -> ViewUtil.showMsgDialog(context,
+                        "游戏总金额" + item.getBalance() + "元,按比例" + item.getRatio() + "%进行消费,最低消费" + item.getMin_amount() + "元。\n" +
+                                "\n" +
+                                "例如(消费100元可用" + item.getRatio() + "元小绵羊定向消费金额)",
+                        "定向消费详情",
+                        false));
 
 
                 //CommonUtil.getInstance().getCharSequence(context, item.getName(), "")
                 //CommonUtil.getInstance().getCharSequence(context, item.getName(), "")
-                ((TextView)viewHolder.itemView.findViewById(R.id.item_name_tv)).setText(item.getName()+"");
+                ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_name_tv), item.getName());
                 final TextView task_type_tv = viewHolder.itemView.findViewById(R.id.task_type_tv);
                 final TextView task_type_tv = viewHolder.itemView.findViewById(R.id.task_type_tv);
                 task_type_tv.setVisibility(View.VISIBLE);
                 task_type_tv.setVisibility(View.VISIBLE);
                 viewHolder.itemView.findViewById(R.id.item_money).setVisibility(View.GONE);
                 viewHolder.itemView.findViewById(R.id.item_money).setVisibility(View.GONE);
 
 
                 GlideImageLoader.setGameImage((ImageView) viewHolder.itemView.findViewById(R.id.item_icon_iv), item.getIcon());
                 GlideImageLoader.setGameImage((ImageView) viewHolder.itemView.findViewById(R.id.item_icon_iv), item.getIcon());
-                if(item.isGameReservationCantDownload()){
+                if (item.isGameReservationCantDownload()) {
                     task_type_tv.setEnabled(false);
                     task_type_tv.setEnabled(false);
                     detail_task_tv.setEnabled(false);
                     detail_task_tv.setEnabled(false);
                     viewHolder.itemView.setEnabled(true);
                     viewHolder.itemView.setEnabled(true);
@@ -229,16 +228,10 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                     task_type_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
                     task_type_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
                     detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
                     detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
 
 
-                    viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View v) {
-                            Jump2View.getInstance().goGameTaskDetailView(context,  item.getRelease_task_id(), item.getGame_id(),1);
-
-                        }
-                    });
+                    viewHolder.itemView.setOnClickListener(v -> Jump2View.getInstance().goGameTaskDetailView(context, item.getRelease_task_id(), item.getGame_id(), 1));
                     return;
                     return;
                 }
                 }
-                if(TextUtils.isEmpty(item.getPackage_name())){
+                if (TextUtils.isEmpty(item.getPackage_name())) {
                     task_type_tv.setEnabled(false);
                     task_type_tv.setEnabled(false);
                     detail_task_tv.setEnabled(false);
                     detail_task_tv.setEnabled(false);
                     viewHolder.itemView.setEnabled(false);
                     viewHolder.itemView.setEnabled(false);
@@ -258,13 +251,13 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                 final DownloadUtil mDownloadTaskService = new DownloadUtil();
                 final DownloadUtil mDownloadTaskService = new DownloadUtil();
 
 
                 String taskTypeTvValue;
                 String taskTypeTvValue;
-                if(isInstall){//已经安装
+                if (isInstall) {//已经安装
                     taskTypeTvValue = "启动游戏";
                     taskTypeTvValue = "启动游戏";
-                }else{
+                } else {
                     DownLoadInfo downLoadInfo = mDownloadTaskService.getDownloadTaskByUrl(item.getDownload_url());
                     DownLoadInfo downLoadInfo = mDownloadTaskService.getDownloadTaskByUrl(item.getDownload_url());
-                    if(downLoadInfo == null) {
+                    if (downLoadInfo == null) {
                         taskTypeTvValue = "下载游戏";
                         taskTypeTvValue = "下载游戏";
-                    }else {
+                    } else {
                         Integer mStatus = downLoadInfo.getMStatus();
                         Integer mStatus = downLoadInfo.getMStatus();
                         int taskState = mStatus == null ? 0 : mStatus;
                         int taskState = mStatus == null ? 0 : mStatus;
                         switch (taskState) {
                         switch (taskState) {
@@ -275,7 +268,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                                 taskTypeTvValue = CommonUtil.CONTINUE_DOWNLOAD;
                                 taskTypeTvValue = CommonUtil.CONTINUE_DOWNLOAD;
                                 break;
                                 break;
                             case DownloadUtil.STATUS_FINISH:
                             case DownloadUtil.STATUS_FINISH:
-                                if(isExistApk){
+                                if (isExistApk) {
                                     taskTypeTvValue = "安装游戏";
                                     taskTypeTvValue = "安装游戏";
                                 } else {
                                 } else {
                                     taskTypeTvValue = CommonUtil.START_DOWNLOAD;
                                     taskTypeTvValue = CommonUtil.START_DOWNLOAD;
@@ -290,59 +283,44 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                         }
                         }
                     }
                     }
                 }
                 }
-                task_type_tv.setText(taskTypeTvValue+"");
+                task_type_tv.setText(taskTypeTvValue + "");
                 task_type_tv.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + item.getDownload_url());
                 task_type_tv.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + item.getDownload_url());
 //                TaskHelper.setNumText((TextView) viewHolder.itemView.findViewById(R.id.item_num_tv), taskReleaseEty);
 //                TaskHelper.setNumText((TextView) viewHolder.itemView.findViewById(R.id.item_num_tv), taskReleaseEty);
 //                ((TextView)viewHolder.itemView.findViewById(R.id.item_money)).setText("+"+ item.getBonusText() +"元");
 //                ((TextView)viewHolder.itemView.findViewById(R.id.item_money)).setText("+"+ item.getBonusText() +"元");
                 //任务领取
                 //任务领取
-                task_type_tv.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        try{
-                            switch (task_type_tv.getText().toString().trim() +""){
-                                case "安装游戏":
-                                    ApkUtils.installApk(SheepApp.getInstance(), PackageUtil.isExistsFile(item.getPackage_name(), item.getDownload_url()));
-                                    PackageUtil.startApp(SheepApp.getInstance(), item.getPackage_name());
-                                    break;
-                                case "启动游戏":
-                                    ApkUtils.installApk(SheepApp.getInstance(), PackageUtil.isExistsFile(item.getPackage_name(), item.getDownload_url()));
-                                    PackageUtil.startApp(SheepApp.getInstance(), item.getPackage_name());
-                                    break;
-                                default:
-                                    final DownLoadInfo downLoadInfo = mDownloadTaskService.getDownloadTaskByUrl(item);
-                                    mDownloadTaskService.start(downLoadInfo);
-                                    new Thread(new Runnable() {
-                                        @Override
-                                        public void run() {
-                                            if(mDownloadTaskService.addDownloadTask(downLoadInfo)){
-                                                //发送红点信息
-                                                EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.TIPS_DOWN_ICON));
-                                            }
+                task_type_tv.setOnClickListener(v -> {
+                    try {
+                        switch (task_type_tv.getText().toString().trim() + "") {
+                            case "安装游戏":
+                                ApkUtils.installApk(SheepApp.getInstance(), PackageUtil.isExistsFile(item.getPackage_name(), item.getDownload_url()));
+                                PackageUtil.startApp(SheepApp.getInstance(), item.getPackage_name());
+                                break;
+                            case "启动游戏":
+                                ApkUtils.installApk(SheepApp.getInstance(), PackageUtil.isExistsFile(item.getPackage_name(), item.getDownload_url()));
+                                PackageUtil.startApp(SheepApp.getInstance(), item.getPackage_name());
+                                break;
+                            default:
+                                final DownLoadInfo downLoadInfo = mDownloadTaskService.getDownloadTaskByUrl(item);
+                                mDownloadTaskService.start(downLoadInfo);
+                                new Thread(new Runnable() {
+                                    @Override
+                                    public void run() {
+                                        if (mDownloadTaskService.addDownloadTask(downLoadInfo)) {
+                                            //发送红点信息
+                                            EventBus.getDefault().post(BigEvent.get().setEventTypes(EventTypes.TIPS_DOWN_ICON));
                                         }
                                         }
-                                    }).start();
-                                    break;
-                            }
-                        }catch (Exception e){
-                            e.printStackTrace();
-                            G.showToast("服务器繁忙,请稍候再试!");
+                                    }
+                                }).start();
+                                break;
                         }
                         }
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        G.showToast("服务器繁忙,请稍候再试!");
                     }
                     }
                 });
                 });
                 //去充值
                 //去充值
-                detail_task_tv.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-
-                        ViewUtil.showGamePayAccount((Activity) context, item.getGame_id(), item.getName());
-                    }
-                });
-                viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        Jump2View.getInstance().goGameTaskDetailView(context,  item.getRelease_task_id(), item.getGame_id(),1);
-
-                    }
-                });
+                detail_task_tv.setOnClickListener(v -> ViewUtil.showGamePayAccount((Activity) context, item.getGame_id(), item.getName()));
+                viewHolder.itemView.setOnClickListener(v -> Jump2View.getInstance().goGameTaskDetailView(context, item.getRelease_task_id(), item.getGame_id(), 1));
 //                TestUtil.setDebugDownLoad(context, viewHolder.itemView, item.getTask());
 //                TestUtil.setDebugDownLoad(context, viewHolder.itemView, item.getTask());
             }
             }
 
 
@@ -352,8 +330,10 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
             }
             }
         });
         });
     }
     }
- /**
+
+    /**
      * 游戏代充平台
      * 游戏代充平台
+     *
      * @param holder
      * @param holder
      * @param etyList
      * @param etyList
      */
      */
@@ -379,7 +359,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
             @Override
             @Override
             public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, final int i) {
             public void onBindViewHolder(@NonNull RecyclerView.ViewHolder viewHolder, final int i) {
                 final GameAgencyRechargePlatformEntity item = ListUtil.getItem(etyList, i);
                 final GameAgencyRechargePlatformEntity item = ListUtil.getItem(etyList, i);
-                if(item == null){
+                if (item == null) {
                     return;
                     return;
                 }
                 }
                 View padding = viewHolder.itemView.findViewById(R.id.padding);
                 View padding = viewHolder.itemView.findViewById(R.id.padding);
@@ -387,18 +367,18 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                 TextView detail_task_tv_center = viewHolder.itemView.findViewById(R.id.detail_task_tv);
                 TextView detail_task_tv_center = viewHolder.itemView.findViewById(R.id.detail_task_tv);
                 detail_task_tv_center.setVisibility(View.VISIBLE);
                 detail_task_tv_center.setVisibility(View.VISIBLE);
 
 
-                if(i == getItemCount()-1){
+                if (i == getItemCount() - 1) {
                     viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.GONE);
                     viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.GONE);
-                }else {
+                } else {
                     viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.GONE);
                     viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.GONE);
                 }
                 }
                 detail_task_tv_center.setText("充值");
                 detail_task_tv_center.setText("充值");
 
 
                 //name
                 //name
-                ((TextView)viewHolder.itemView.findViewById(R.id.item_name_tv)).setText(item.getName()+"");
+                ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_name_tv), item.getName());
 
 
                 final TextView item_num_tv = viewHolder.itemView.findViewById(R.id.item_num_tv);
                 final TextView item_num_tv = viewHolder.itemView.findViewById(R.id.item_num_tv);
-                item_num_tv.setText(item.getDesc()+"");
+                ViewUtil.setText(item_num_tv, item.getDesc());
 
 
                 Glide.with(context)
                 Glide.with(context)
                         .load(item.getIcon())
                         .load(item.getIcon())
@@ -407,15 +387,12 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
 
 
 
 
                 //去充值
                 //去充值
-                detail_task_tv_center.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        PayEntity payEntity = new PayEntity();
-                        payEntity.setTask_type(item.getTask_type()+"");
-                        ViewUtil.newInstance().showGamePayAccount((Activity) context, payEntity);
+                detail_task_tv_center.setOnClickListener(v -> {
+                    PayEntity payEntity = new PayEntity();
+                    payEntity.setTask_type(item.getTask_type() + "");
+                    ViewUtil.newInstance().showGamePayAccount((Activity) context, payEntity);
 
 
 //                        ViewUtil.showGamePayAccount((Activity) context, item.getTask_type());
 //                        ViewUtil.showGamePayAccount((Activity) context, item.getTask_type());
-                    }
                 });
                 });
             }
             }
 
 
@@ -429,16 +406,16 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
     /**
     /**
      * 游戏代充
      * 游戏代充
      */
      */
-    private void bindGameReleaseTask(ViewHolder holder, final List<Release_task> etyList, final int isBegin){
+    private void bindGameReleaseTask(ViewHolder holder, final List<Release_task> etyList, final int isBegin) {
         RecyclerView recyclerView = holder.getView(R.id.release_task_listview, RecyclerView.class);
         RecyclerView recyclerView = holder.getView(R.id.release_task_listview, RecyclerView.class);
         recyclerView.setHasFixedSize(true);
         recyclerView.setHasFixedSize(true);
         recyclerView.setLayoutManager(new LinearLayoutManager(context));
         recyclerView.setLayoutManager(new LinearLayoutManager(context));
-        recyclerView.setAdapter(new RecyclerView.Adapter(){
+        recyclerView.setAdapter(new RecyclerView.Adapter() {
 
 
             @Override
             @Override
             public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
             public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
                 LinearLayout view = (LinearLayout) LayoutInflater.from(context)
                 LinearLayout view = (LinearLayout) LayoutInflater.from(context)
-                        .inflate(R.layout.try_makemoney_item_recommend, viewGroup,false);
+                        .inflate(R.layout.try_makemoney_item_recommend, viewGroup, false);
                 RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(view) {
                 RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(view) {
                     @Override
                     @Override
                     public String toString() {
                     public String toString() {
@@ -456,12 +433,12 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                     return;
                     return;
                 }
                 }
                 viewHolder.itemView.setTag(TAG_ID_TEMP, etyList.get(i).getId());
                 viewHolder.itemView.setTag(TAG_ID_TEMP, etyList.get(i).getId());
-                ((TextView) viewHolder.itemView.findViewById(R.id.item_name_tv)).setText(taskReleaseEty.getName() + "");
-                ((TextView) viewHolder.itemView.findViewById(R.id.item_num_tv)).setText(taskReleaseEty.getTask().getDetailShow()+"");
-                ((TextView) viewHolder.itemView.findViewById(R.id.item_money)).setVisibility(View.GONE);
-                GlideImageLoader.setGameImage((ImageView) viewHolder.itemView.findViewById(R.id.item_icon_iv), taskEty.getIcon());
+                ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_name_tv), taskReleaseEty.getName());
+                ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_num_tv), taskReleaseEty.getTask().getDetailShow());
+                ViewUtil.setVisibility(viewHolder.itemView.findViewById(R.id.item_money), false);
+                GlideImageLoader.setGameImage(viewHolder.itemView.findViewById(R.id.item_icon_iv), taskEty.getIcon());
                 viewHolder.itemView.setEnabled(false);
                 viewHolder.itemView.setEnabled(false);
-                ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setVisibility(View.GONE);
+                ViewUtil.setVisibility(viewHolder.itemView.findViewById(R.id.item_date_tv), false);
                 viewHolder.itemView.findViewById(R.id.task_top).setVisibility(View.GONE);
                 viewHolder.itemView.findViewById(R.id.task_top).setVisibility(View.GONE);
 
 
                 if (i == getItemCount() - 1) {
                 if (i == getItemCount() - 1) {
@@ -474,7 +451,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                 TextView detail_task_tv_down = viewHolder.itemView.findViewById(R.id.detail_task_tv_down);
                 TextView detail_task_tv_down = viewHolder.itemView.findViewById(R.id.detail_task_tv_down);
 
 
 
 
-                if(!taskReleaseEty.getTask().isCan_receive_account()){
+                if (!taskReleaseEty.getTask().isCan_receive_account()) {
 //                    detail_task_tv.setText("已有账号");
 //                    detail_task_tv.setText("已有账号");
 //                    detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
 //                    detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
 //                    detail_task_tv.setEnabled(false);
 //                    detail_task_tv.setEnabled(false);
@@ -483,28 +460,20 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                     detail_task_tv_down.setVisibility(View.VISIBLE);
                     detail_task_tv_down.setVisibility(View.VISIBLE);
                     taskReleaseEty.getDownloadHelper().updateDownloadTaskView(true, taskEty, detail_task_tv_down);
                     taskReleaseEty.getDownloadHelper().updateDownloadTaskView(true, taskEty, detail_task_tv_down);
                     detail_task_tv_down.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + taskEty.getDownload_link());
                     detail_task_tv_down.setTag(PUBLIC_TAG_PREFIX_TEXTVIEW_LIST + taskEty.getDownload_link());
-                }else {
+                } else {
                     detail_task_tv.setVisibility(View.VISIBLE);
                     detail_task_tv.setVisibility(View.VISIBLE);
                     detail_task_tv_down.setVisibility(View.GONE);
                     detail_task_tv_down.setVisibility(View.GONE);
                     detail_task_tv.setText("领取帐号");
                     detail_task_tv.setText("领取帐号");
                     detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_bg_gradient_rectangle_blue));
                     detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_bg_gradient_rectangle_blue));
                     detail_task_tv.setEnabled(true);
                     detail_task_tv.setEnabled(true);
                     viewHolder.itemView.setEnabled(false);
                     viewHolder.itemView.setEnabled(false);
-                    detail_task_tv.setOnClickListener(new View.OnClickListener() {
-                        @Override
-                        public void onClick(View v) {
-                            GAME_INSTEAD_OF_RECHARGE_GET.onEvent();
-                            CommonUtil.getInstance()
-                                    .gameAccountManager(context, Integer.parseInt(taskReleaseEty.getTask_id()), new Action1<BaseMessage>() {
-                                        @Override
-                                        public void call(BaseMessage baseMessage) {
-                                            G.showToast("领取成功");
-                                            EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.GENERATION_ACCOUNT_REFRESH));
-
-
-                                        }
-                                    });
-                        }
+                    detail_task_tv.setOnClickListener(v -> {
+                        GAME_INSTEAD_OF_RECHARGE_GET.onEvent();
+                        CommonUtil.getInstance()
+                                .gameAccountManager(context, Integer.parseInt(taskReleaseEty.getTask_id()), baseMessage -> {
+                                    G.showToast("领取成功");
+                                    EventBus.getDefault().post(new BigEvent().setEventTypes(EventTypes.GENERATION_ACCOUNT_REFRESH));
+                                });
                     });
                     });
                 }
                 }
 
 
@@ -514,16 +483,13 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                 TextView task_type_tv = viewHolder.itemView.findViewById(R.id.task_type_tv);
                 TextView task_type_tv = viewHolder.itemView.findViewById(R.id.task_type_tv);
                 task_type_tv.setText("立即充值");
                 task_type_tv.setText("立即充值");
                 task_type_tv.setVisibility(View.VISIBLE);
                 task_type_tv.setVisibility(View.VISIBLE);
-                task_type_tv.setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View v) {
-                        GAME_INSTEAD_OF_RECHARGE_GAME.onEvent();
-                        PayEntity payEntity = new PayEntity();
-                        payEntity.setTask_type(taskEty.getTask_type()+"");
-                        payEntity.setGame_id(taskReleaseEty.getTask().getThird_task_id());
-                        payEntity.setGame_name(taskReleaseEty.getName());
-                        ViewUtil.newInstance().showGamePayAccount((Activity) context, payEntity);
-                    }
+                task_type_tv.setOnClickListener(v -> {
+                    GAME_INSTEAD_OF_RECHARGE_GAME.onEvent();
+                    PayEntity payEntity = new PayEntity();
+                    payEntity.setTask_type(taskEty.getTask_type() + "");
+                    payEntity.setGame_id(taskReleaseEty.getTask().getThird_task_id());
+                    payEntity.setGame_name(taskReleaseEty.getName());
+                    ViewUtil.newInstance().showGamePayAccount((Activity) context, payEntity);
                 });
                 });
 
 
             }
             }
@@ -534,19 +500,20 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
             }
             }
         });
         });
     }
     }
+
     /**
     /**
      * 获取已发布的
      * 获取已发布的
      */
      */
-    private void bindReleaseTask(ViewHolder holder, final List<Release_task> etyList, final int isBegin){
+    private void bindReleaseTask(ViewHolder holder, final List<Release_task> etyList, final int isBegin) {
         RecyclerView recyclerView = holder.getView(R.id.release_task_listview, RecyclerView.class);
         RecyclerView recyclerView = holder.getView(R.id.release_task_listview, RecyclerView.class);
         recyclerView.setHasFixedSize(true);
         recyclerView.setHasFixedSize(true);
         recyclerView.setLayoutManager(new LinearLayoutManager(context));
         recyclerView.setLayoutManager(new LinearLayoutManager(context));
-        recyclerView.setAdapter(new RecyclerView.Adapter(){
+        recyclerView.setAdapter(new RecyclerView.Adapter() {
 
 
             @Override
             @Override
             public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
             public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
                 LinearLayout view = (LinearLayout) LayoutInflater.from(context)
                 LinearLayout view = (LinearLayout) LayoutInflater.from(context)
-                        .inflate(R.layout.try_makemoney_item_recommend, viewGroup,false);
+                        .inflate(R.layout.try_makemoney_item_recommend, viewGroup, false);
                 RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(view) {
                 RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(view) {
                     @Override
                     @Override
                     public String toString() {
                     public String toString() {
@@ -564,12 +531,13 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                     return;
                     return;
                 }
                 }
                 viewHolder.itemView.setTag(TAG_ID_TEMP, etyList.get(i).getId());
                 viewHolder.itemView.setTag(TAG_ID_TEMP, etyList.get(i).getId());
-                ((TextView) viewHolder.itemView.findViewById(R.id.item_name_tv)).setText(taskReleaseEty.getName() + "");
-                CommonUtil.getInstance().setTaskTag(context, viewHolder.itemView, taskReleaseEty,show_type);
-                ((TextView) viewHolder.itemView.findViewById(R.id.item_money)).setText("+" + taskReleaseEty.getBonusText() + "元");
+                ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_name_tv), taskReleaseEty.getName());
+                CommonUtil.getInstance().setTaskTag(context, viewHolder.itemView, taskReleaseEty, show_type);
+                ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_money), "+" + taskReleaseEty.getBonusText() + "元");
                 ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_money_vip_tv), taskReleaseEty.getVipBonusText());
                 ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_money_vip_tv), taskReleaseEty.getVipBonusText());
+                ViewUtil.setVisibility(viewHolder.itemView.findViewById(R.id.item_money_vip_tv), true);
 
 
-                GlideImageLoader.setGameImage((ImageView) viewHolder.itemView.findViewById(R.id.item_icon_iv), taskEty.getIcon());
+                GlideImageLoader.setGameImage(viewHolder.itemView.findViewById(R.id.item_icon_iv), taskEty.getIcon());
                 if (isBegin == 1 || type == 2) {//即将开始
                 if (isBegin == 1 || type == 2) {//即将开始
                     viewHolder.itemView.setEnabled(false);
                     viewHolder.itemView.setEnabled(false);
                     ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
                     ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
@@ -617,18 +585,18 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                 TextView detail_task_tv = viewHolder.itemView.findViewById(R.id.detail_task_tv);
                 TextView detail_task_tv = viewHolder.itemView.findViewById(R.id.detail_task_tv);
 
 
 
 
-                if("0".equals(taskReleaseEty.getLast_num())){
+                if ("0".equals(taskReleaseEty.getLast_num())) {
                     detail_task_tv.setText(R.string.task_taken_all);
                     detail_task_tv.setText(R.string.task_taken_all);
                     detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
                     detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
                     detail_task_tv.setEnabled(false);
                     detail_task_tv.setEnabled(false);
                     viewHolder.itemView.setEnabled(false);
                     viewHolder.itemView.setEnabled(false);
-                }else {
-                    if(isBegin == 1 || type == 2){//即将开始
+                } else {
+                    if (isBegin == 1 || type == 2) {//即将开始
                         detail_task_tv.setText("即将开始");
                         detail_task_tv.setText("即将开始");
                         detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
                         detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_rectangle_bg_gray_radius));
                         detail_task_tv.setEnabled(false);
                         detail_task_tv.setEnabled(false);
                         viewHolder.itemView.setEnabled(false);
                         viewHolder.itemView.setEnabled(false);
-                    } else if(taskEty.isGameReservationCantDownload()){//游戏任务中的预约任务,且不能下载情况下
+                    } else if (taskEty.isGameReservationCantDownload()) {//游戏任务中的预约任务,且不能下载情况下
                         detail_task_tv.setText("预约下载");
                         detail_task_tv.setText("预约下载");
                         detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_bg_gradient_rectangle_blue));
                         detail_task_tv.setBackground(context.getResources().getDrawable(R.drawable.sp_bg_gradient_rectangle_blue));
                         detail_task_tv.setEnabled(true);
                         detail_task_tv.setEnabled(true);
@@ -643,7 +611,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
 
 
 
 
                 detail_task_tv.setOnClickListener(v -> {
                 detail_task_tv.setOnClickListener(v -> {
-                    if(taskEty.isGameReservationCantDownload()) {//游戏任务中的预约任务,且不能下载情况下
+                    if (taskEty.isGameReservationCantDownload()) {//游戏任务中的预约任务,且不能下载情况下
                         Action1<Integer> action1 = type -> {
                         Action1<Integer> action1 = type -> {
                             switch (type) {
                             switch (type) {
                                 case 1:
                                 case 1:
@@ -651,7 +619,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                                     break;
                                     break;
                             }
                             }
                         };
                         };
-                        if(taskReleaseEty.getAccepted_task_id() < 1){//没有正在进行的任务
+                        if (taskReleaseEty.getAccepted_task_id() < 1) {//没有正在进行的任务
                             CommonUtil.getInstance().reservationGameTask(taskReleaseEty, action1);
                             CommonUtil.getInstance().reservationGameTask(taskReleaseEty, action1);
                         } else {//先取消正在进行的任务
                         } else {//先取消正在进行的任务
                             CommonUtil.getInstance().tryGiveUpTask(taskReleaseEty, action1);
                             CommonUtil.getInstance().tryGiveUpTask(taskReleaseEty, action1);
@@ -673,11 +641,11 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                         taskEty.setBonus(taskReleaseEty.getBonusText());
                         taskEty.setBonus(taskReleaseEty.getBonusText());
                         taskEty.setRelease_task_id(taskReleaseEty.getId());
                         taskEty.setRelease_task_id(taskReleaseEty.getId());
                         taskEty.setName(taskReleaseEty.getName());
                         taskEty.setName(taskReleaseEty.getName());
-                        if("0".equals(taskReleaseEty.getLast_num())){
-                            Jump2View.getInstance().goTaskDetailView(context,  taskReleaseEty.getId(), true);
+                        if ("0".equals(taskReleaseEty.getLast_num())) {
+                            Jump2View.getInstance().goTaskDetailView(context, taskReleaseEty.getId(), true);
                             return;
                             return;
                         }
                         }
-                        Jump2View.getInstance().goTaskDetailView(context,  taskReleaseEty.getId());
+                        Jump2View.getInstance().goTaskDetailView(context, taskReleaseEty.getId());
                     }
                     }
                 });
                 });
 
 
@@ -692,21 +660,22 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
 
 
     /**
     /**
      * 暂时这么处理,也许以后也是列表了
      * 暂时这么处理,也许以后也是列表了
+     *
      * @param holder
      * @param holder
      * @param etyList
      * @param etyList
      */
      */
-    private void bindRunTask(ViewHolder holder, final List<TaskAcceptedEty> etyList){
+    private void bindRunTask(ViewHolder holder, final List<TaskAcceptedEty> etyList) {
         RecyclerView recyclerView = holder.getView(R.id.release_task_listview, RecyclerView.class);
         RecyclerView recyclerView = holder.getView(R.id.release_task_listview, RecyclerView.class);
         recyclerView.setHasFixedSize(true);
         recyclerView.setHasFixedSize(true);
 //        recyclerView.setLayoutManager(new StaggeredGridLayoutManager(1,
 //        recyclerView.setLayoutManager(new StaggeredGridLayoutManager(1,
 //                StaggeredGridLayoutManager.VERTICAL));
 //                StaggeredGridLayoutManager.VERTICAL));
         recyclerView.setLayoutManager(new LinearLayoutManager(context));
         recyclerView.setLayoutManager(new LinearLayoutManager(context));
-        recyclerView.setAdapter(new RecyclerView.Adapter(){
+        recyclerView.setAdapter(new RecyclerView.Adapter() {
 
 
             @Override
             @Override
             public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
             public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
                 LinearLayout view = (LinearLayout) LayoutInflater.from(context)
                 LinearLayout view = (LinearLayout) LayoutInflater.from(context)
-                        .inflate(R.layout.try_makemoney_item_recommend, viewGroup,false);
+                        .inflate(R.layout.try_makemoney_item_recommend, viewGroup, false);
                 RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(view) {
                 RecyclerView.ViewHolder viewHolder = new RecyclerView.ViewHolder(view) {
                     @Override
                     @Override
                     public String toString() {
                     public String toString() {
@@ -721,43 +690,44 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                 final TaskAcceptedEty taskAcceptedEty;
                 final TaskAcceptedEty taskAcceptedEty;
                 final Release_task taskReleaseEty;
                 final Release_task taskReleaseEty;
                 final TaskEty taskEty;
                 final TaskEty taskEty;
-                if((taskAcceptedEty = ListUtil.getItem(etyList, i)) == null
+                if ((taskAcceptedEty = ListUtil.getItem(etyList, i)) == null
                         || (taskReleaseEty = taskAcceptedEty.getRelease_task()) == null
                         || (taskReleaseEty = taskAcceptedEty.getRelease_task()) == null
-                        || (taskEty = taskReleaseEty.getTask()) == null){
+                        || (taskEty = taskReleaseEty.getTask()) == null) {
                     return;
                     return;
                 }
                 }
-                    viewHolder.itemView.setTag(TAG_ID_TEMP, etyList.get(i).getId());
-                if(i == 0){
+                viewHolder.itemView.setTag(TAG_ID_TEMP, etyList.get(i).getId());
+                if (i == 0) {
                     viewHolder.itemView.findViewById(R.id.task_top).setVisibility(View.VISIBLE);
                     viewHolder.itemView.findViewById(R.id.task_top).setVisibility(View.VISIBLE);
                     viewHolder.itemView.findViewById(R.id.item_title_tv).setVisibility(View.VISIBLE);
                     viewHolder.itemView.findViewById(R.id.item_title_tv).setVisibility(View.VISIBLE);
-                    ((TextView)viewHolder.itemView.findViewById(R.id.item_title_tv)).setText("进行中");
-                }else{
+                    ((TextView) viewHolder.itemView.findViewById(R.id.item_title_tv)).setText("进行中");
+                } else {
                     viewHolder.itemView.findViewById(R.id.task_top).setVisibility(View.GONE);
                     viewHolder.itemView.findViewById(R.id.task_top).setVisibility(View.GONE);
                 }
                 }
                 viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.GONE);
                 viewHolder.itemView.findViewById(R.id.line_tv).setVisibility(View.GONE);
 
 
 
 
-                ((TextView)viewHolder.itemView.findViewById(R.id.item_name_tv)).setText(taskReleaseEty.getName()+"");
-                CommonUtil.getInstance().setTaskTag(context, viewHolder.itemView, taskReleaseEty,show_type);
-                ((TextView)viewHolder.itemView.findViewById(R.id.item_money)).setText("+"+ taskReleaseEty.getBonusText() +"元");
+                ((TextView) viewHolder.itemView.findViewById(R.id.item_name_tv)).setText(taskReleaseEty.getName() + "");
+                CommonUtil.getInstance().setTaskTag(context, viewHolder.itemView, taskReleaseEty, show_type);
+                ((TextView) viewHolder.itemView.findViewById(R.id.item_money)).setText("+" + taskReleaseEty.getBonusText() + "元");
                 ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_money_vip_tv), taskReleaseEty.getVipBonusText());
                 ViewUtil.setText(viewHolder.itemView.findViewById(R.id.item_money_vip_tv), taskReleaseEty.getVipBonusText());
-                if(!taskReleaseEty.getDeadline().equals("永久")){
-                    ((TextView)viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
-                            "截止时间:" + TimeUtil.getDate(TimeUtil.FORMAT_DD, Long.valueOf(taskReleaseEty.getDeadline()))+"");
-                }else {
-                    ((TextView)viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
+                ViewUtil.setVisibility(viewHolder.itemView.findViewById(R.id.item_money_vip_tv), true);
+                if (!taskReleaseEty.getDeadline().equals("永久")) {
+                    ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
+                            "截止时间:" + TimeUtil.getDate(TimeUtil.FORMAT_DD, Long.valueOf(taskReleaseEty.getDeadline())) + "");
+                } else {
+                    ((TextView) viewHolder.itemView.findViewById(R.id.item_date_tv)).setText(
                             "截止时间:" + taskReleaseEty.getDeadline());
                             "截止时间:" + taskReleaseEty.getDeadline());
                 }
                 }
 
 
-                ((TextView)viewHolder.itemView.findViewById(R.id.detail_task_tv)).setText(R.string.cancel);
+                ((TextView) viewHolder.itemView.findViewById(R.id.detail_task_tv)).setText(R.string.cancel);
 
 
-                if((is_succession == 1 || is_succession == 3)
-                        &&  (taskAcceptedEty.getChild_task_id() > 1
-                                || (taskAcceptedEty.getChild_task_id() == 1
+                if ((is_succession == 1 || is_succession == 3)
+                        && (taskAcceptedEty.getChild_task_id() > 1
+                        || (taskAcceptedEty.getChild_task_id() == 1
                         && (taskAcceptedEty.getStatus() == 6 || taskAcceptedEty.getStatus() == 7 || taskAcceptedEty.getStatus() == 9)))
                         && (taskAcceptedEty.getStatus() == 6 || taskAcceptedEty.getStatus() == 7 || taskAcceptedEty.getStatus() == 9)))
-                        ){
+                ) {
                     viewHolder.itemView.findViewById(R.id.detail_task_tv).setVisibility(View.GONE);
                     viewHolder.itemView.findViewById(R.id.detail_task_tv).setVisibility(View.GONE);
-                }else {
+                } else {
 
 
                     viewHolder.itemView.findViewById(R.id.detail_task_tv).setVisibility(View.VISIBLE);
                     viewHolder.itemView.findViewById(R.id.detail_task_tv).setVisibility(View.VISIBLE);
                 }
                 }
@@ -792,7 +762,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                     @Override
                     @Override
                     public void onClick(View v) {
                     public void onClick(View v) {
                         TaskAcceptedEty item = ListUtil.getItem(etyList, i);
                         TaskAcceptedEty item = ListUtil.getItem(etyList, i);
-                        if(item == null){
+                        if (item == null) {
                             return;
                             return;
                         }
                         }
                         UMConfigUtils.IdEvent.TASK.commit(item.getRelease_task_id());
                         UMConfigUtils.IdEvent.TASK.commit(item.getRelease_task_id());
@@ -802,7 +772,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                         taskEty.setRelease_task_id(taskReleaseEty.getId());
                         taskEty.setRelease_task_id(taskReleaseEty.getId());
                         taskEty.setAcceptedTaskId(taskAcceptedEty.getId());
                         taskEty.setAcceptedTaskId(taskAcceptedEty.getId());
                         taskEty.setName(taskReleaseEty.getName());
                         taskEty.setName(taskReleaseEty.getName());
-                        Jump2View.getInstance().goTaskDetailView(context,  taskReleaseEty.getId());
+                        Jump2View.getInstance().goTaskDetailView(context, taskReleaseEty.getId());
                         UMConfigUtils.onEvent(UMConfigUtils.Event.TASK_DETAIL);
                         UMConfigUtils.onEvent(UMConfigUtils.Event.TASK_DETAIL);
                     }
                     }
                 });
                 });
@@ -812,14 +782,14 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                   倒计时
                   倒计时
                  */
                  */
                 final TextView countdown_tv = viewHolder.itemView.findViewById(R.id.end_of_time_tv);
                 final TextView countdown_tv = viewHolder.itemView.findViewById(R.id.end_of_time_tv);
-                if(taskAcceptedEty.getEnd_time() > 0){
+                if (taskAcceptedEty.getEnd_time() > 0) {
                     SelfCountDownTimer scTimer = timerHashMap.get(countdown_tv);
                     SelfCountDownTimer scTimer = timerHashMap.get(countdown_tv);
-                    if(scTimer != null){
+                    if (scTimer != null) {
                         scTimer.cancel();
                         scTimer.cancel();
                     }
                     }
 
 
                     countdown_tv.setVisibility(View.VISIBLE);
                     countdown_tv.setVisibility(View.VISIBLE);
-                    SelfCountDownTimer selfCountDownTimer = new SelfCountDownTimer( taskAcceptedEty.getEnd_time() * 1000, 1000, taskReleaseEty.getCancel_duration()) {
+                    SelfCountDownTimer selfCountDownTimer = new SelfCountDownTimer(taskAcceptedEty.getEnd_time() * 1000, 1000, taskReleaseEty.getCancel_duration()) {
                         @Override
                         @Override
                         public void onTimerRest() {
                         public void onTimerRest() {
                             countdown_tv.setText("");
                             countdown_tv.setText("");
@@ -841,7 +811,7 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
                     selfCountDownTimer.reset(taskReleaseEty.getCancel_duration());
                     selfCountDownTimer.reset(taskReleaseEty.getCancel_duration());
                     selfCountDownTimer.start();
                     selfCountDownTimer.start();
                     timerHashMap.put(countdown_tv, selfCountDownTimer);
                     timerHashMap.put(countdown_tv, selfCountDownTimer);
-                }else {
+                } else {
                     countdown_tv.setVisibility(View.GONE);
                     countdown_tv.setVisibility(View.GONE);
                 }
                 }
 
 
@@ -871,19 +841,19 @@ public class TryMakeMoneyAdp extends AdbCommonRecycler<RecyleObj> {
         timerHashMap.clear();
         timerHashMap.clear();
     }
     }
 
 
-    public void refreshAdapter(){
+    public void refreshAdapter() {
         notifyDataSetChanged();
         notifyDataSetChanged();
     }
     }
 
 
     public boolean isEmpty() {
     public boolean isEmpty() {
-        switch (type){
+        switch (type) {
             case 0://推荐任务
             case 0://推荐任务
                 RecyleObj item;
                 RecyleObj item;
-                if((item = ListUtil.getItem(listData, 0)) != null
+                if ((item = ListUtil.getItem(listData, 0)) != null
                         && item.getRecyleType() == RUN_TASK
                         && item.getRecyleType() == RUN_TASK
-                        && !ListUtil.isEmpty((List<TaskAcceptedEty>)item.getDataObj())){
+                        && !ListUtil.isEmpty((List<TaskAcceptedEty>) item.getDataObj())) {
                     return false;
                     return false;
-                }else {
+                } else {
                     return true;
                     return true;
                 }
                 }
             case 2://即将开始
             case 2://即将开始

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

@@ -1,6 +1,5 @@
 package com.sheep.gamegroup.view.fragment;
 package com.sheep.gamegroup.view.fragment;
 
 
-import android.content.DialogInterface;
 import android.content.Intent;
 import android.content.Intent;
 import android.support.annotation.NonNull;
 import android.support.annotation.NonNull;
 import android.support.v7.widget.RecyclerView;
 import android.support.v7.widget.RecyclerView;

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

@@ -60,7 +60,10 @@ public class FgtFind extends BaseFragment {
 
 
     private void initView() {
     private void initView() {
         mAdapter = new TitleFragmentListAdapter(getChildFragmentManager());
         mAdapter = new TitleFragmentListAdapter(getChildFragmentManager());
-        mAdapter.add(FgtFindChild.newInstance(0), "全部");
+        ArticleTag articleTagAll = new ArticleTag();
+        articleTagAll.setId(0);
+        articleTagAll.setName("全部");
+        mAdapter.add(FgtFindChild.newInstance(articleTagAll), articleTagAll.getName());
         //悬浮
         //悬浮
         ViewUtil.setImage(add_article_expand, ViewUtil.getNetImgByName("add_article_expand"));
         ViewUtil.setImage(add_article_expand, ViewUtil.getNetImgByName("add_article_expand"));
         if (!onlyChooseVideo) {
         if (!onlyChooseVideo) {
@@ -164,7 +167,7 @@ public class FgtFind extends BaseFragment {
                             mAdapter.add(FgtArticleVideo.newInstance(findLabel.getId()), findLabel.getName());
                             mAdapter.add(FgtArticleVideo.newInstance(findLabel.getId()), findLabel.getName());
                             break;
                             break;
                         default:
                         default:
-                            mAdapter.add(FgtFindChild.newInstance(findLabel.getId()), findLabel.getName());
+                            mAdapter.add(FgtFindChild.newInstance(findLabel), findLabel.getName());
                             break;
                             break;
                     }
                     }
                     count++;
                     count++;

+ 23 - 20
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtFindChild.java

@@ -23,6 +23,7 @@ import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.model.entity.Lp;
 import com.sheep.gamegroup.module.ad_htxd.model.ArticleAd;
 import com.sheep.gamegroup.module.ad_htxd.model.ArticleAd;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.DownloadUtil;
 import com.sheep.gamegroup.util.DownloadUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ListUtil;
@@ -58,6 +59,7 @@ import static android.content.Intent.ACTION_PACKAGE_REMOVED;
 public class FgtFindChild extends BaseListFragment5<Article> {
 public class FgtFindChild extends BaseListFragment5<Article> {
 
 
     private int type;
     private int type;
+    private boolean showAd;
 
 
     @Override
     @Override
     public void initView() {
     public void initView() {
@@ -67,7 +69,7 @@ public class FgtFindChild extends BaseListFragment5<Article> {
 
 
     @Override
     @Override
     protected RecyclerView.Adapter getAdapter() {
     protected RecyclerView.Adapter getAdapter() {
-        return new CommonRecycler(ArticleAd.showAd ? allList : list);
+        return new CommonRecycler(showAd ? allList : list);
     }
     }
 
 
     @Override
     @Override
@@ -85,24 +87,21 @@ public class FgtFindChild extends BaseListFragment5<Article> {
         return Article.class;
         return Article.class;
     }
     }
 
 
-    private List<Article> allList = new ArrayList<>();
+    private List<Article> allList = new ArrayList<>();//显示广告时使用allList,否则使用list
 
 
     @Override
     @Override
     protected void loadList(List<Article> addList) {
     protected void loadList(List<Article> addList) {
-        if(ArticleAd.showAd) {
+        if (showAd) {
             ListUtil.addAll(allList, addList);
             ListUtil.addAll(allList, addList);
-            if (ListUtil.size(addList) == per_page) {
-                ArticleAd.fetchNativeData(articleAd -> {
-                    if (ListUtil.getLast(allList, per_page - ArticleAd.INDEX) instanceof ArticleAd) {//倒数第几个不是广告的情况下才添加
-                        return false;
-                    } else {
-                        return ListUtil.addLastIndex(allList, articleAd, per_page - ArticleAd.INDEX);
-                    }
-                }, aBoolean -> {
-                    if (aBoolean) {
-                        notifyDataSetChanged();
-                    }
-                });
+            if (1 == page) {
+                Article item = ListUtil.getItem(allList, ArticleAd.INDEX);
+                if (!(item instanceof ArticleAd)) {//倒数第几个不是广告的情况下才添加
+                    ArticleAd.fetchNativeData(articleAd -> ListUtil.insertIndex(allList, articleAd, ArticleAd.INDEX), ok -> {
+                        if (ok) {
+                            notifyDataSetChanged();
+                        }
+                    });
+                }
             }
             }
         }
         }
         super.loadList(addList);
         super.loadList(addList);
@@ -110,15 +109,15 @@ public class FgtFindChild extends BaseListFragment5<Article> {
 
 
     @Override
     @Override
     public void clear() {
     public void clear() {
-        if(ArticleAd.showAd)
+        if (showAd)
             allList.clear();
             allList.clear();
         super.clear();
         super.clear();
     }
     }
 
 
-    public static FgtFindChild newInstance(int type) {
+    public static FgtFindChild newInstance(ArticleTag articleTag) {
         FgtFindChild fgt = new FgtFindChild();
         FgtFindChild fgt = new FgtFindChild();
         Bundle bundle = new Bundle();
         Bundle bundle = new Bundle();
-        bundle.putInt("type", type);
+        DataUtil.putObject(bundle, articleTag);
         fgt.setArguments(bundle);
         fgt.setArguments(bundle);
         return fgt;
         return fgt;
     }
     }
@@ -266,7 +265,11 @@ public class FgtFindChild extends BaseListFragment5<Article> {
         super.onCreate(savedInstanceState);
         super.onCreate(savedInstanceState);
         Bundle bundle = getArguments();
         Bundle bundle = getArguments();
         if (bundle != null) {
         if (bundle != null) {
-            type = bundle.getInt("type", 0);
+            ArticleTag articleTag = DataUtil.getObject(bundle, ArticleTag.class);
+            if (articleTag != null) {
+                type = articleTag.getId();
+                showAd = ArticleAd.showAd && TextUtils.equals(articleTag.getName(), "资讯");//只有资讯才显示
+            }
         }
         }
         EventBus.getDefault().register(this);
         EventBus.getDefault().register(this);
     }
     }
@@ -332,7 +335,7 @@ public class FgtFindChild extends BaseListFragment5<Article> {
 
 
         @Override
         @Override
         public int getItemViewType(int position) {
         public int getItemViewType(int position) {
-            Article article = (ArticleAd.showAd ? allList : list).get(position);
+            Article article = (showAd ? allList : list).get(position);
             return article.getType();
             return article.getType();
         }
         }
 
 

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

@@ -19,6 +19,7 @@ import com.kfzs.duanduan.utils.ApkUtils;
 import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.kfzs.duanduan.utils.NumberFormatUtils;
 import com.sheep.gamegroup.model.entity.AgentEntity;
 import com.sheep.gamegroup.model.entity.AgentEntity;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.BaseMessage;
+import com.sheep.gamegroup.model.entity.Mission;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.UserEntity;
 import com.sheep.gamegroup.model.entity.UserTaskExistsNew;
 import com.sheep.gamegroup.model.entity.UserTaskExistsNew;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.model.entity.WebParams;
@@ -29,6 +30,7 @@ import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ListUtil;
+import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
@@ -122,6 +124,10 @@ public class FgtPersonalCenter extends BaseFragment {
     TextView vip_flag_view_tv;
     TextView vip_flag_view_tv;
     @BindView(R.id.voucher_red_dot)
     @BindView(R.id.voucher_red_dot)
     View voucher_red_dot;
     View voucher_red_dot;
+    @BindView(R.id.fgt_pc_item_my_pet_v)
+    View fgt_pc_item_my_pet_v;
+    @BindView(R.id.my_pet_layout)
+    View my_pet_layout;
 
 
     public UserEntity userEntity;
     public UserEntity userEntity;
     private String faqUrl;
     private String faqUrl;
@@ -223,6 +229,28 @@ public class FgtPersonalCenter extends BaseFragment {
                 });
                 });
         initUserModuleItemByACache();
         initUserModuleItemByACache();
         initUserModuleItem();
         initUserModuleItem();
+        initMyPetState();
+    }
+
+    private void initMyPetState() {
+        SheepApp.getInstance().getNetComponent().getApiService().missionGetinfo(5, 3)
+                        .subscribeOn(Schedulers.io())
+                        .observeOn(AndroidSchedulers.mainThread())
+                        .subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
+                            @Override
+                            public void onNext(BaseMessage baseMessage) {
+                                Mission result = baseMessage.getData(Mission.class);
+                                boolean hasPet = result != null && result.getId() > 0;
+                                ViewUtil.setVisibility(my_pet_layout, hasPet);
+                                ViewUtil.setVisibility(fgt_pc_item_my_pet_v, hasPet);
+                            }
+
+                            @Override
+                            public void onError(BaseMessage baseMessage) {
+                                ViewUtil.setVisibility(my_pet_layout, false);
+                                ViewUtil.setVisibility(fgt_pc_item_my_pet_v, false);
+                            }
+                        });
     }
     }
 
 
 
 
@@ -418,7 +446,7 @@ public class FgtPersonalCenter extends BaseFragment {
             R.id.version_layout, R.id.order_layout, R.id.proxy_game_account_layout,
             R.id.version_layout, R.id.order_layout, R.id.proxy_game_account_layout,
             R.id.audit_activity_cl, R.id.audit_success_cl, R.id.audit_failed_cl,
             R.id.audit_activity_cl, R.id.audit_success_cl, R.id.audit_failed_cl,
             R.id.iv_redpackage, R.id.fgt_person_center_my_focus, R.id.fgt_pc_item_vip_ll,
             R.id.iv_redpackage, R.id.fgt_person_center_my_focus, R.id.fgt_pc_item_vip_ll,
-            R.id.voucher_layout
+            R.id.voucher_layout, R.id.my_pet_layout
     })
     })
     public void onViewClicked(View view) {
     public void onViewClicked(View view) {
         switch (view.getId()) {
         switch (view.getId()) {
@@ -443,6 +471,9 @@ public class FgtPersonalCenter extends BaseFragment {
             case R.id.account_detail_layout://个人资料
             case R.id.account_detail_layout://个人资料
                 Jump2View.getInstance().goPersionInfo(activity, null);
                 Jump2View.getInstance().goPersionInfo(activity, null);
                 break;
                 break;
+            case R.id.my_pet_layout://我的宠物
+                CommonUtil.getInstance().initUrlConfigByNet(Config.KEY_MY_PET_URL, url -> Jump2View.getInstance().goWeb(activity, url, "我的宠物"));
+                break;
             case R.id.fgt_pc_item_vip_ll://VIP
             case R.id.fgt_pc_item_vip_ll://VIP
                 Jump2View.getInstance().gotoVip(activity);
                 Jump2View.getInstance().gotoVip(activity);
                 break;
                 break;

+ 32 - 38
app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java

@@ -691,16 +691,14 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 
 
     @SuppressLint("ClickableViewAccessibility")
     @SuppressLint("ClickableViewAccessibility")
     public void initListener() {
     public void initListener() {
-        scrollView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() {
-            @Override
-            public void onScrollChange(NestedScrollView nestedScrollView, int x, int y, int oldX, int oldY) {
-                listTitle.getLocationInWindow(locate);
-                if (locate[1] < 0 && titleCardLayout.getVisibility() == View.GONE) {
-                    ViewUtil.setVisibility(titleCardLayout, true);
-                } else if (locate[1] > 20 && titleCardLayout.getVisibility() == View.VISIBLE) {
-                    ViewUtil.setVisibility(titleCardLayout, false);
-                }
-                //设置搜索框颜色变化
+        scrollView.setOnScrollChangeListener((NestedScrollView.OnScrollChangeListener) (nestedScrollView, x, y, oldX, oldY) -> {
+            listTitle.getLocationInWindow(locate);
+            if (locate[1] < 0 && titleCardLayout.getVisibility() == View.GONE) {
+                ViewUtil.setVisibility(titleCardLayout, true);
+            } else if (locate[1] > 20 && titleCardLayout.getVisibility() == View.VISIBLE) {
+                ViewUtil.setVisibility(titleCardLayout, false);
+            }
+            //设置搜索框颜色变化
 //                float ratio = Math.min(bannerHeight, y) * 1.0f / bannerHeight;
 //                float ratio = Math.min(bannerHeight, y) * 1.0f / bannerHeight;
 //                to_search_but_rl.setBackgroundColor(Color.argb((int) (ratio * 255), 255, 255, 255));
 //                to_search_but_rl.setBackgroundColor(Color.argb((int) (ratio * 255), 255, 255, 255));
 //                float colorRatio = 1 - ratio * 0.26f;
 //                float colorRatio = 1 - ratio * 0.26f;
@@ -720,36 +718,32 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 //                    }
 //                    }
 //                }
 //                }
 //                LogUtil.println("FgtSmallSheep", "onScrollChange", x, y, oldX, oldY, locate[0], locate[1]);
 //                LogUtil.println("FgtSmallSheep", "onScrollChange", x, y, oldX, oldY, locate[0], locate[1]);
-            }
         });
         });
-        scrollView.setOnTouchListener(new View.OnTouchListener() {
-            @Override
-            public boolean onTouch(View v, MotionEvent event) {
-                switch (event.getAction()) {
-                    case MotionEvent.ACTION_DOWN:
-                        if (upview1 != null) {
-                            //开始滚动
-                            upview1.stopFlipping();
-                        }
-                        if (homepageItemNoticeMv != null) {
-                            //开始滚动
-                            homepageItemNoticeMv.stopFlipping();
-                        }
-                        break;
-                    case MotionEvent.ACTION_UP:
-                    default:
-                        if (upview1 != null) {
-                            //开始滚动
-                            upview1.startFlipping();
-                        }
-                        if (homepageItemNoticeMv != null) {
-                            //开始滚动
-                            homepageItemNoticeMv.startFlipping();
-                        }
-                        break;
-                }
-                return false;
+        scrollView.setOnTouchListener((v, event) -> {
+            switch (event.getAction()) {
+                case MotionEvent.ACTION_DOWN:
+                    if (upview1 != null) {
+                        //开始滚动
+                        upview1.stopFlipping();
+                    }
+                    if (homepageItemNoticeMv != null) {
+                        //开始滚动
+                        homepageItemNoticeMv.stopFlipping();
+                    }
+                    break;
+                case MotionEvent.ACTION_UP:
+                default:
+                    if (upview1 != null) {
+                        //开始滚动
+                        upview1.startFlipping();
+                    }
+                    if (homepageItemNoticeMv != null) {
+                        //开始滚动
+                        homepageItemNoticeMv.startFlipping();
+                    }
+                    break;
             }
             }
+            return false;
         });
         });
 
 
         refresh.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {
         refresh.setOnRefreshLoadMoreListener(new OnRefreshLoadMoreListener() {

+ 4 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java

@@ -45,5 +45,9 @@ public class Config {
     public static final String KEY_DIRECTIONAL_RECHARGE_URL = "directional_recharge_url";
     public static final String KEY_DIRECTIONAL_RECHARGE_URL = "directional_recharge_url";
     //新春活动地址 key
     //新春活动地址 key
     public static final String KEY_NEW_SPRING_ACTIVITIES_URL = "new_spring_activities_url";
     public static final String KEY_NEW_SPRING_ACTIVITIES_URL = "new_spring_activities_url";
+    //我的宠物地址 key
+    public static final String KEY_MY_PET_URL = "my_pet_url";
 
 
+    //微信支付app_id
+    public static final String WX_PAY_APP_ID = "wx427e8e74e8dd27a6";
 }
 }

+ 11 - 0
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -54,6 +54,8 @@ import com.squareup.leakcanary.LeakCanary;
 import com.squareup.leakcanary.RefWatcher;
 import com.squareup.leakcanary.RefWatcher;
 import com.tencent.bugly.Bugly;
 import com.tencent.bugly.Bugly;
 import com.tencent.bugly.beta.Beta;
 import com.tencent.bugly.beta.Beta;
+import com.tencent.mm.opensdk.openapi.IWXAPI;
+import com.tencent.mm.opensdk.openapi.WXAPIFactory;
 import com.tencent.smtt.sdk.QbSdk;
 import com.tencent.smtt.sdk.QbSdk;
 import com.umeng.commonsdk.UMConfigure;
 import com.umeng.commonsdk.UMConfigure;
 import com.umeng.socialize.PlatformConfig;
 import com.umeng.socialize.PlatformConfig;
@@ -289,6 +291,15 @@ public class SheepApp extends MultiDexApplication {
         }
         }
         //初始化换肤框架
         //初始化换肤框架
         SkinUtil.init();
         SkinUtil.init();
+        //注册微信支付
+        wxApi = WXAPIFactory.createWXAPI(this, null);
+        // 将该app注册到微信
+        wxApi.registerApp(Config.WX_PAY_APP_ID);
+    }
+    private IWXAPI wxApi;
+
+    public IWXAPI getWxApi() {
+        return wxApi;
     }
     }
 
 
     private void initBdLocationOption() {
     private void initBdLocationOption() {

+ 6 - 27
app/src/main/java/com/sheep/jiuyan/samllsheep/utils/TitleBarUtils.java

@@ -13,17 +13,17 @@ import android.support.v7.app.AppCompatActivity;
 import android.support.v7.widget.AppCompatAutoCompleteTextView;
 import android.support.v7.widget.AppCompatAutoCompleteTextView;
 import android.text.Editable;
 import android.text.Editable;
 import android.text.TextWatcher;
 import android.text.TextWatcher;
-import android.util.Log;
+import android.view.KeyEvent;
 import android.view.View;
 import android.view.View;
 import android.widget.Button;
 import android.widget.Button;
 import android.widget.ImageButton;
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.ImageView;
 import android.widget.TextView;
 import android.widget.TextView;
 
 
+import com.sheep.gamegroup.absBase.BaseActivity;
+import com.sheep.gamegroup.util.KeyEventUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.util.ViewUtil;
-import com.sheep.gamegroup.view.activity.ActCommentGameApp;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
-import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 
 
@@ -114,12 +114,7 @@ public class TitleBarUtils {
      */
      */
     public TitleBarUtils setTitleFinish(final Activity activity) {
     public TitleBarUtils setTitleFinish(final Activity activity) {
         activity.getWindow().getDecorView().findViewById(R.id.img_baseactivity_title)
         activity.getWindow().getDecorView().findViewById(R.id.img_baseactivity_title)
-                .setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        activity.finish();
-                    }
-                });
+                .setOnClickListener(view -> KeyEventUtil.sendKeyDownUp(KeyEvent.KEYCODE_BACK));
         return mTitleBarUtils;
         return mTitleBarUtils;
     }
     }
 
 
@@ -134,17 +129,6 @@ public class TitleBarUtils {
         return mTitleBarUtils;
         return mTitleBarUtils;
     }
     }
 
 
-    public TitleBarUtils setTitleFinish(final View view, final Activity activity) {
-        view.findViewById(R.id.img_baseactivity_title)
-                .setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        activity.finish();
-                    }
-                });
-        return mTitleBarUtils;
-    }
-
     public TitleBarUtils setTitleFinish(final View view, View.OnClickListener listener) {
     public TitleBarUtils setTitleFinish(final View view, View.OnClickListener listener) {
         view.findViewById(R.id.img_baseactivity_title)
         view.findViewById(R.id.img_baseactivity_title)
                 .setOnClickListener(listener);
                 .setOnClickListener(listener);
@@ -157,14 +141,9 @@ public class TitleBarUtils {
         return mTitleBarUtils;
         return mTitleBarUtils;
     }
     }
 
 
-    public TitleBarUtils setTitleFinish(final Activity activity, View view) {
+    public TitleBarUtils setTitleFinish(View view) {
         view.findViewById(R.id.img_baseactivity_title)
         view.findViewById(R.id.img_baseactivity_title)
-                .setOnClickListener(new View.OnClickListener() {
-                    @Override
-                    public void onClick(View view) {
-                        activity.finish();
-                    }
-                });
+                .setOnClickListener(v -> KeyEventUtil.sendKeyDownUp(KeyEvent.KEYCODE_BACK));
         return mTitleBarUtils;
         return mTitleBarUtils;
     }
     }
 
 

+ 11 - 0
app/src/main/res/color/new_year_selector_color_tab2.xml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:state_enabled="false" android:color="#30BFF2" />
+    <item android:state_activated="true" android:color="#30BFF2" />
+    <item android:state_focused="true" android:color="#30BFF2" />
+    <item android:state_checked="true" android:color="#30BFF2"/>
+    <item android:state_selected="true" android:color="#30BFF2"/>
+    <item android:state_pressed="true" android:color="#30BFF2"/>
+    <item android:color="#444444"/>
+</selector>

BIN
app/src/main/res/drawable-xxhdpi/icon.png


BIN
app/src/main/res/drawable-xxhdpi/icon_new_year.png


BIN
app/src/main/res/drawable-xxhdpi/new_year_yaoqingzq_bg_3.png


BIN
app/src/main/res/drawable-xxhdpi/new_year_yaoqingzq_bg_3.webp


+ 7 - 0
app/src/main/res/drawable/button_full_upgrade_click.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners android:radius="30dp" />
+
+    <solid android:color="#33FF834C" />
+</shape>

+ 7 - 0
app/src/main/res/drawable/button_full_upgrade_normal.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+    android:shape="rectangle">
+    <corners android:radius="30dp" />
+
+    <solid android:color="#FF834C" />
+</shape>

+ 9 - 0
app/src/main/res/drawable/selector_button_full_upgrade.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/button_full_upgrade_click" />
+  <item android:state_checked="true" android:drawable="@drawable/button_full_upgrade_click"/>
+  <item android:state_selected="true" android:drawable="@drawable/button_full_upgrade_click"/>
+  <item android:state_pressed="true" android:drawable="@drawable/button_full_upgrade_click"/>
+  <item android:drawable="@drawable/button_full_upgrade_normal"/>
+</selector>

+ 100 - 93
app/src/main/res/layout/act_audit_layout.xml

@@ -5,42 +5,43 @@
     android:layout_height="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
     android:orientation="vertical">
 
 
-    <LinearLayout
+    <android.support.constraint.ConstraintLayout
         android:id="@+id/root_1"
         android:id="@+id/root_1"
         android:layout_width="match_parent"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:background="@mipmap/audit_top_bg"
-        android:orientation="vertical">
+        android:layout_height="wrap_content">
 
 
-        <LinearLayout
+        <ImageView
+            android:id="@+id/act_audit_bg_iv"
             android:layout_width="match_parent"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
-            android:fitsSystemWindows="true"
-            android:gravity="center_horizontal"
-            android:orientation="horizontal">
+            android:adjustViewBounds="true"
+            android:scaleType="fitXY"
+            android:src="@mipmap/audit_top_bg"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <ImageView
+            android:id="@+id/img_baseactivity_title"
+            android:layout_width="wrap_content"
+            android:layout_height="?attr/actionBarSize"
+            android:layout_marginTop="10dp"
+            android:gravity="center_vertical"
+            android:paddingStart="@dimen/content_padding_20"
+            android:paddingEnd="@dimen/content_padding_20"
+            android:scaleType="centerInside"
+            android:src="@drawable/narrow_back_white"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
 
 
-            <ImageView
-                android:id="@+id/img_baseactivity_title"
-                android:layout_width="wrap_content"
-                android:layout_height="?attr/actionBarSize"
-                android:gravity="center_vertical"
-                android:paddingEnd="@dimen/content_padding_20"
-                android:paddingStart="@dimen/content_padding_20"
-                android:scaleType="centerInside"
-                android:src="@drawable/narrow_back_white" />
-
-            <TextView
-                android:id="@+id/txt_baseactivity_title"
-                android:layout_width="wrap_content"
-                android:layout_height="?attr/actionBarSize"
-                android:layout_weight="1"
-                android:layout_marginRight="?attr/actionBarSize"
-                android:gravity="center"
-                android:text="@string/app_name"
-                android:textColor="@color/white"
-                android:textSize="@dimen/text_size_5" />
-
-        </LinearLayout>
+        <TextView
+            android:id="@+id/txt_baseactivity_title"
+            android:layout_width="match_parent"
+            android:layout_height="?attr/actionBarSize"
+            android:layout_marginTop="10dp"
+            android:gravity="center"
+            android:text="@string/app_name"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_size_5"
+            app:layout_constraintTop_toTopOf="parent" />
 
 
         <TextView
         <TextView
             android:id="@+id/number_tv"
             android:id="@+id/number_tv"
@@ -49,73 +50,79 @@
             android:gravity="center"
             android:gravity="center"
             android:text="111"
             android:text="111"
             android:textColor="@color/white"
             android:textColor="@color/white"
-            android:textSize="@dimen/text_size_3" />
+            android:textSize="@dimen/text_size_3"
+            app:layout_constraintBottom_toBottomOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
 
 
-        <LinearLayout
-            android:layout_width="match_parent"
+        <TextView
+            android:id="@+id/audit_total_complete_tv"
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_below="@+id/number_tv"
-            android:layout_marginTop="@dimen/content_padding_15">
-
-            <TextView
-                android:id="@+id/audit_total_complete_tv"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:gravity="center"
-                android:text=""
-                android:textColor="@color/white"
-                android:textSize="@dimen/text_size_13" />
-
-            <View
-                android:layout_width="1dp"
-                android:layout_height="20dp"
-                android:layout_gravity="center"
-                android:background="@color/disenable_color" />
-
-            <TextView
-                android:id="@+id/audit_total_money_tv"
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:gravity="center"
-                android:text=""
-                android:textColor="@color/white"
-                android:textSize="@dimen/text_size_13" />
-
-            <View
-                android:layout_width="1dp"
-                android:layout_height="20dp"
-                android:layout_gravity="center"
-                android:background="@color/disenable_color" />
-
-            <LinearLayout
-                android:layout_width="0dp"
-                android:layout_height="wrap_content"
-                android:layout_weight="1"
-                android:gravity="center_vertical"
-                android:orientation="horizontal">
+            android:layout_marginBottom="26dp"
+            android:gravity="center"
+            android:text="累计完成"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_size_13"
+            app:layout_constraintBottom_toBottomOf="@id/act_audit_bg_iv"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toStartOf="@id/act_audit_line_1"/>
+
+        <View
+            android:id="@+id/act_audit_line_1"
+            android:layout_width="1dp"
+            android:layout_height="20dp"
+            android:layout_gravity="center"
+            android:background="@color/disenable_color"
+            app:layout_constraintBottom_toBottomOf="@id/audit_total_complete_tv"
+            app:layout_constraintStart_toEndOf="@id/audit_total_complete_tv"
+            app:layout_constraintEnd_toStartOf="@id/audit_total_money_tv"
+            app:layout_constraintTop_toTopOf="@id/audit_total_complete_tv" />
 
 
-                <TextView
-                    android:id="@+id/audit_total_welfare_tv"
-                    android:layout_width="0dp"
-                    android:layout_height="wrap_content"
-                    android:layout_weight="1"
-                    android:gravity="center"
-                    android:text=""
-                    android:textColor="@color/white"
-                    android:textSize="@dimen/text_size_13" />
+        <TextView
+            android:id="@+id/audit_total_money_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:text="累计现金"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_size_13"
+            app:layout_constraintStart_toEndOf="@id/act_audit_line_1"
+            app:layout_constraintEnd_toStartOf="@id/act_audit_line_2"
+            app:layout_constraintBottom_toBottomOf="@id/audit_total_complete_tv"/>
+
+        <View
+            android:id="@+id/act_audit_line_2"
+            android:layout_width="1dp"
+            android:layout_height="20dp"
+            android:layout_gravity="center"
+            android:background="@color/disenable_color"
+            app:layout_constraintBottom_toBottomOf="@id/audit_total_complete_tv"
+            app:layout_constraintStart_toEndOf="@id/audit_total_money_tv"
+            app:layout_constraintEnd_toStartOf="@id/audit_total_welfare_tv"
+            app:layout_constraintTop_toTopOf="@id/audit_total_complete_tv" />
 
 
-                <ImageView
-                    android:id="@+id/my_money_dingxiang_amount_iv"
-                    android:layout_width="35dp"
-                    android:layout_height="35dp"
-                    android:layout_gravity="right"
-                    android:padding="10dp"
-                    android:src="@mipmap/question_mark" />
-            </LinearLayout>
-        </LinearLayout>
-    </LinearLayout>
+        <TextView
+            android:id="@+id/audit_total_welfare_tv"
+            android:layout_width="0dp"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:text="累计福利"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_size_13"
+            app:layout_constraintStart_toEndOf="@id/act_audit_line_2"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintBottom_toBottomOf="@id/audit_total_complete_tv"/>
+
+        <ImageView
+            android:id="@+id/my_money_dingxiang_amount_iv"
+            android:layout_width="35dp"
+            android:layout_height="35dp"
+            android:padding="10dp"
+            android:src="@mipmap/question_mark"
+            app:layout_constraintBottom_toBottomOf="@id/audit_total_complete_tv"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintTop_toTopOf="@id/audit_total_complete_tv" />
+    </android.support.constraint.ConstraintLayout>
 
 
     <android.support.design.widget.TabLayout
     <android.support.design.widget.TabLayout
         android:id="@+id/indicator"
         android:id="@+id/indicator"

+ 5 - 0
app/src/main/res/layout/common_container_nofit.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/frame_container"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"/>

+ 53 - 0
app/src/main/res/layout/dialog_parent_update.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:layout_margin="@dimen/dp_10">
+
+        <ImageView
+            android:id="@+id/dialog_bg_iv"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:adjustViewBounds="true"
+            android:fitsSystemWindows="true"
+            android:src="@mipmap/bg_upgrade_app" />
+
+        <TextView
+            android:id="@+id/dialog_title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignTop="@id/dialog_bg_iv"
+            android:layout_marginStart="40dp"
+            android:layout_marginTop="50dp"
+            android:gravity="center"
+            android:text="发现新版本"
+            android:textColor="@android:color/white"
+            android:textSize="26sp" />
+
+        <TextView
+            android:id="@+id/dialog_msg"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_centerInParent="true"
+            android:gravity="center_vertical"
+            android:lineSpacingExtra="4dp"
+            android:paddingStart="40dp"
+            android:paddingTop="20dp"
+            android:paddingEnd="40dp"
+            android:text="内容"
+            android:textColor="@color/black_text_deep"
+            android:textSize="14sp" />
+
+        <include
+            layout="@layout/x_msg_dialog_btn"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignBottom="@id/dialog_bg_iv"
+            android:layout_margin="16dp" />
+    </RelativeLayout>
+</FrameLayout>

+ 101 - 0
app/src/main/res/layout/fgt_find2.xml

@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="@color/white">
+
+    <android.support.constraint.ConstraintLayout
+        android:id="@+id/layout_navigationBar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/bg_home_color"
+        android:paddingTop="@dimen/status_bar_height">
+
+        <ImageView
+            android:id="@+id/img_baseactivity_title"
+            android:layout_width="wrap_content"
+            android:layout_height="?attr/actionBarSize"
+            android:gravity="center_vertical"
+            android:paddingStart="@dimen/content_padding_20"
+            android:paddingEnd="@dimen/content_padding_20"
+            android:scaleType="centerInside"
+            android:src="@drawable/narrow_back_white"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/txt_baseactivity_title"
+            android:layout_width="wrap_content"
+            android:layout_height="?attr/actionBarSize"
+            android:layout_centerInParent="true"
+            android:gravity="center"
+            android:text="发现"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_size_4"
+            app:layout_constraintBottom_toBottomOf="@+id/img_baseactivity_title"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/img_baseactivity_title" />
+    </android.support.constraint.ConstraintLayout>
+
+    <ImageView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:adjustViewBounds="true"
+        android:scaleType="fitXY"
+        android:layout_below="@id/layout_navigationBar"
+        android:src="@drawable/skin_drawable_selector_bg_home_search" />
+
+    <android.support.design.widget.TabLayout
+        android:id="@+id/indicator"
+        style="@style/style_tab_2"
+        android:layout_below="@id/layout_navigationBar"
+        android:layout_marginTop="20dp" />
+
+    <android.support.v4.view.ViewPager
+        android:id="@+id/pager"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_below="@id/indicator" />
+
+    <com.kfzs.duanduan.view.DragRelativeLayout
+        android:id="@+id/add_article"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentEnd="true"
+        android:layout_centerVertical="true">
+
+        <ImageView
+            android:id="@+id/add_article_iv"
+            android:layout_width="120dp"
+            android:layout_height="120dp"
+            android:src="@drawable/icon" />
+
+        <ImageView
+            android:id="@+id/add_article_expand"
+            android:layout_width="72dp"
+            android:layout_height="72dp"
+            android:layout_alignTop="@id/add_article_iv"
+            android:layout_alignEnd="@id/add_article_iv"
+            android:src="@drawable/icon" />
+
+        <ImageView
+            android:id="@+id/add_article_camera"
+            android:layout_width="25dp"
+            android:layout_height="22dp"
+            android:layout_marginStart="15dp"
+            android:layout_marginTop="18dp"
+            android:src="@drawable/icon" />
+
+        <ImageView
+            android:id="@+id/add_article_pic"
+            android:layout_width="26dp"
+            android:layout_height="25dp"
+            android:layout_alignEnd="@id/add_article_iv"
+            android:layout_alignBottom="@id/add_article_iv"
+            android:layout_marginEnd="22dp"
+            android:layout_marginBottom="19dp"
+            android:src="@drawable/icon" />
+    </com.kfzs.duanduan.view.DragRelativeLayout>
+</RelativeLayout>

+ 40 - 19
app/src/main/res/layout/fgt_personalcenter_item_center_one.xml

@@ -22,66 +22,65 @@
     </LinearLayout>
     </LinearLayout>
 
 
     <View
     <View
-        android:id="@+id/fgt_pc_item_vip_v"
+        android:id="@+id/fgt_pc_item_my_pet_v"
         style="@style/style_item_line_new"
         style="@style/style_item_line_new"
         android:visibility="gone" />
         android:visibility="gone" />
-
     <LinearLayout
     <LinearLayout
-        android:id="@+id/fgt_pc_item_vip_ll"
-        style="@style/style_item_container"
-        android:visibility="gone">
+        android:id="@+id/my_pet_layout"
+        style="@style/style_item_container">
 
 
         <ImageView
         <ImageView
             style="@style/style_item_img"
             style="@style/style_item_img"
-            android:src="@mipmap/ic_vip_pc_item" />
+            android:src="@mipmap/ic_my_pet" />
 
 
         <TextView
         <TextView
             style="@style/style_item_label"
             style="@style/style_item_label"
-            android:text="VIP" />
+            android:text="我的宠物" />
 
 
         <TextView style="@style/style_item_end_next" />
         <TextView style="@style/style_item_end_next" />
 
 
     </LinearLayout>
     </LinearLayout>
 
 
     <View
     <View
+        android:id="@+id/fgt_pc_item_vip_v"
         style="@style/style_item_line_new"
         style="@style/style_item_line_new"
         android:visibility="gone" />
         android:visibility="gone" />
 
 
     <LinearLayout
     <LinearLayout
-        android:id="@+id/account_task_layout"
+        android:id="@+id/fgt_pc_item_vip_ll"
         style="@style/style_item_container"
         style="@style/style_item_container"
         android:visibility="gone">
         android:visibility="gone">
 
 
         <ImageView
         <ImageView
             style="@style/style_item_img"
             style="@style/style_item_img"
-            android:src="@mipmap/x_ic_task_history" />
+            android:src="@mipmap/ic_vip_pc_item" />
 
 
         <TextView
         <TextView
             style="@style/style_item_label"
             style="@style/style_item_label"
-            android:text="审核中心" />
+            android:text="VIP" />
 
 
         <TextView style="@style/style_item_end_next" />
         <TextView style="@style/style_item_end_next" />
 
 
     </LinearLayout>
     </LinearLayout>
 
 
-    <View style="@style/style_item_line_new" />
+    <View
+        style="@style/style_item_line_new"
+        android:visibility="gone" />
 
 
     <LinearLayout
     <LinearLayout
-        android:id="@+id/order_layout"
+        android:id="@+id/account_task_layout"
         style="@style/style_item_container"
         style="@style/style_item_container"
-        android:visibility="visible">
+        android:visibility="gone">
 
 
         <ImageView
         <ImageView
             style="@style/style_item_img"
             style="@style/style_item_img"
-            android:src="@mipmap/order_manager" />
+            android:src="@mipmap/x_ic_task_history" />
 
 
         <TextView
         <TextView
             style="@style/style_item_label"
             style="@style/style_item_label"
-            android:text="订单管理" />
+            android:text="审核中心" />
 
 
-        <TextView
-            style="@style/style_item_end_next"
-            android:visibility="visible" />
+        <TextView style="@style/style_item_end_next" />
 
 
     </LinearLayout>
     </LinearLayout>
 
 
@@ -132,9 +131,31 @@
 
 
     </RelativeLayout>
     </RelativeLayout>
 
 
+
+    <View style="@style/style_item_line_new" />
+
+    <LinearLayout
+        android:id="@+id/order_layout"
+        style="@style/style_item_container"
+        android:visibility="visible">
+
+        <ImageView
+            style="@style/style_item_img"
+            android:src="@mipmap/order_manager" />
+
+        <TextView
+            style="@style/style_item_label"
+            android:text="订单管理" />
+
+        <TextView
+            style="@style/style_item_end_next"
+            android:visibility="visible" />
+
+    </LinearLayout>
     <View
     <View
         android:id="@+id/fgt_person_center_my_focus_line"
         android:id="@+id/fgt_person_center_my_focus_line"
-        style="@style/style_item_line_new" />
+        style="@style/style_item_line_new"
+        android:visibility="gone" />
 
 
     <LinearLayout
     <LinearLayout
         android:id="@+id/fgt_person_center_my_focus"
         android:id="@+id/fgt_person_center_my_focus"

+ 2 - 4
app/src/main/res/layout/fragment_sign_in.xml

@@ -24,8 +24,7 @@
 
 
         <EditText
         <EditText
             android:id="@+id/user_name_box"
             android:id="@+id/user_name_box"
-            style="@style/login_edit_style"
-            android:digits="@string/digits_username"
+            style="@style/login_edit_style_name"
             android:hint="请输入用户名/手机号"
             android:hint="请输入用户名/手机号"
             android:maxLength="20"
             android:maxLength="20"
             android:paddingLeft="@dimen/content_padding_5" />
             android:paddingLeft="@dimen/content_padding_5" />
@@ -36,9 +35,8 @@
 
 
         <EditText
         <EditText
             android:id="@+id/password_box"
             android:id="@+id/password_box"
-            style="@style/login_edit_style"
+            style="@style/login_edit_style_pwd"
             android:layout_below="@+id/user_name_box"
             android:layout_below="@+id/user_name_box"
-            android:digits="@string/digits_password"
             android:hint="请输入密码(6-16位)"
             android:hint="请输入密码(6-16位)"
             android:inputType="textPassword"
             android:inputType="textPassword"
             android:maxLength="16"
             android:maxLength="16"

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

@@ -12,7 +12,7 @@
 
 
         <EditText
         <EditText
             android:id="@+id/user_name_box"
             android:id="@+id/user_name_box"
-            style="@style/login_edit_style"
+            style="@style/login_edit_style_name"
             android:maxLength="20"
             android:maxLength="20"
             android:hint="输入用户名(如邮箱地址、常用英文等唯一标识)" />
             android:hint="输入用户名(如邮箱地址、常用英文等唯一标识)" />
 
 
@@ -26,7 +26,7 @@
             <EditText
             <EditText
                 android:id="@+id/password_box"
                 android:id="@+id/password_box"
                 android:layout_weight="1"
                 android:layout_weight="1"
-                style="@style/login_edit_style"
+                style="@style/login_edit_style_pwd"
                 android:hint="输入密码(6-16位)"
                 android:hint="输入密码(6-16位)"
                 android:inputType="textPassword"
                 android:inputType="textPassword"
                 android:lines="1"
                 android:lines="1"
@@ -50,7 +50,7 @@
             <EditText
             <EditText
                 android:id="@+id/password_box2"
                 android:id="@+id/password_box2"
                 android:layout_weight="1"
                 android:layout_weight="1"
-                style="@style/login_edit_style"
+                style="@style/login_edit_style_pwd"
                 android:hint="确认密码"
                 android:hint="确认密码"
                 android:inputType="textPassword"
                 android:inputType="textPassword"
                 android:lines="1"
                 android:lines="1"

+ 3 - 1
app/src/main/res/layout/homepage_act_layout.xml

@@ -174,6 +174,8 @@
 
 
     <include
     <include
         layout="@layout/view_float_title_card"
         layout="@layout/view_float_title_card"
-        android:visibility="visible" />
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_below="@id/to_search_but_rl"/>
 
 
 </RelativeLayout>
 </RelativeLayout>

+ 360 - 0
app/src/main/res/layout/new_year_act_my_money.xml

@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation="vertical"
+    android:background="@color/white"
+    tools:context="com.sheep.gamegroup.view.activity.NewYearActMyMoney">
+
+    <android.support.constraint.ConstraintLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@drawable/shape_gradient_main"
+        android:paddingTop="@dimen/status_bar_height">
+
+        <ImageView
+            android:id="@+id/img_baseactivity_title"
+            android:layout_width="wrap_content"
+            android:layout_height="?attr/actionBarSize"
+            android:gravity="center_vertical"
+            android:paddingStart="@dimen/content_padding_20"
+            android:paddingEnd="@dimen/content_padding_20"
+            android:scaleType="centerInside"
+            android:src="@drawable/narrow_back_white"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="parent" />
+
+        <TextView
+            android:id="@+id/txt_baseactivity_title"
+            android:layout_width="wrap_content"
+            android:layout_height="?attr/actionBarSize"
+            android:layout_centerInParent="true"
+            android:gravity="center"
+            android:text="@string/app_name"
+            android:textColor="@color/white"
+            android:textSize="@dimen/text_size_4"
+            app:layout_constraintBottom_toBottomOf="@+id/img_baseactivity_title"
+            app:layout_constraintEnd_toEndOf="parent"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintTop_toTopOf="@+id/img_baseactivity_title" />
+    </android.support.constraint.ConstraintLayout>
+
+    <com.scwang.smartrefresh.layout.SmartRefreshLayout
+        android:id="@+id/refresh"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent">
+
+        <android.support.v4.widget.NestedScrollView
+            android:id="@+id/scrollView"
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="fill_vertical"
+            android:fillViewport="true"
+            android:scrollbars="none"
+            app:layout_behavior="@string/appbar_scrolling_view_behavior">
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:orientation="vertical">
+
+                <android.support.constraint.ConstraintLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content">
+
+                    <ImageView
+                        android:id="@+id/act_my_money_bg_iv"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:adjustViewBounds="true"
+                        android:scaleType="fitXY"
+                        android:src="@mipmap/new_year_home_blue_bg_hb"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <View
+                        android:id="@+id/act_my_money_top_v"
+                        android:layout_width="match_parent"
+                        android:layout_height="0dp"
+                        app:layout_constraintTop_toTopOf="parent" />
+
+                    <TextView
+                        android:id="@+id/my_money_recharge_tv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="28dp"
+                        android:background="@drawable/shape_white_solid_rectangle_left"
+                        android:gravity="center_vertical"
+                        android:paddingStart="14dp"
+                        android:paddingEnd="10dp"
+                        android:text="充值 >"
+                        android:textColor="#333333"
+                        android:textSize="15sp"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintTop_toBottomOf="@id/act_my_money_top_v" />
+
+                    <TextView
+                        android:id="@+id/my_money_withdraw_tv"
+                        android:layout_width="wrap_content"
+                        android:layout_height="28dp"
+                        android:layout_marginTop="13dp"
+                        android:background="@drawable/shape_white_solid_rectangle_left"
+                        android:gravity="center_vertical"
+                        android:paddingStart="14dp"
+                        android:paddingEnd="10dp"
+                        android:text="提现 >"
+                        android:textColor="#333333"
+                        android:textSize="15sp"
+                        app:layout_constraintEnd_toEndOf="parent"
+                        app:layout_constraintTop_toBottomOf="@id/my_money_recharge_tv" />
+
+                    <TextView
+                        android:id="@+id/my_money_total_money_lable"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginStart="22dp"
+                        android:text="@string/total_money_lable"
+                        android:textColor="#DCF3FD"
+                        android:textSize="15sp"
+                        app:layout_constraintBottom_toBottomOf="@id/my_money_withdraw_tv"
+                        app:layout_constraintStart_toStartOf="parent"
+                        app:layout_constraintTop_toTopOf="@id/my_money_recharge_tv" />
+
+                    <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:orientation="vertical"
+                        app:layout_constraintBottom_toBottomOf="@id/my_money_withdraw_tv"
+                        app:layout_constraintStart_toEndOf="@id/my_money_total_money_lable"
+                        app:layout_constraintTop_toTopOf="@id/my_money_recharge_tv">
+
+                        <TextView
+                            android:id="@+id/my_money_total_money"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="15dp"
+                            android:text="@string/total_money"
+                            android:textColor="@color/white"
+                            android:textSize="25sp" />
+
+                        <TextView
+                            android:id="@+id/my_money_available_amount"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginStart="9dp"
+                            android:layout_marginTop="2dp"
+                            android:background="@drawable/shape_2b0a4c60_solid_rectangle_10"
+                            android:paddingStart="6dp"
+                            android:paddingTop="3dp"
+                            android:paddingEnd="6dp"
+                            android:paddingBottom="3dp"
+                            android:text="@string/available_amount"
+                            android:textColor="@color/white"
+                            android:textSize="12sp" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:id="@+id/my_money_amount_ll"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="18dp"
+                        android:gravity="center_vertical"
+                        android:orientation="horizontal"
+                        app:layout_constraintTop_toBottomOf="@id/my_money_withdraw_tv">
+
+                        <TextView
+                            android:id="@+id/my_money_agent_extract"
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="@string/total_money"
+                            android:textColor="@color/white"
+                            android:textSize="12sp" />
+
+                        <TextView
+                            android:id="@+id/my_money_task_reward"
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="@string/total_money"
+                            android:textColor="@color/white"
+                            android:textSize="12sp" />
+
+                        <LinearLayout
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:orientation="horizontal">
+
+                            <TextView
+                                android:id="@+id/my_money_dingxiang_amount"
+                                android:layout_width="wrap_content"
+                                android:layout_height="wrap_content"
+                                android:text="@string/total_money"
+                                android:textColor="@color/white"
+                                android:textSize="12sp" />
+
+                            <ImageView
+                                android:id="@+id/my_money_dingxiang_amount_iv"
+                                android:layout_width="19dp"
+                                android:layout_height="35dp"
+                                android:paddingStart="2dp"
+                                android:paddingTop="10dp"
+                                android:paddingEnd="2dp"
+                                android:paddingBottom="10dp"
+                                android:src="@mipmap/question_mark" />
+                        </LinearLayout>
+
+                        <TextView
+                            android:id="@+id/my_money_recharge_amount"
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="@string/total_money"
+                            android:textColor="@color/white"
+                            android:textSize="12sp" />
+
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:id="@+id/my_money_ll"
+                        android:layout_width="match_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="2dp"
+                        android:orientation="horizontal"
+                        app:layout_constraintTop_toBottomOf="@id/my_money_amount_ll">
+
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="@string/agent_extract"
+                            android:textColor="@color/white"
+                            android:textSize="12sp" />
+
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="@string/task_reward"
+                            android:textColor="@color/white"
+                            android:textSize="12sp" />
+
+                        <TextView
+                            android:id="@+id/my_money_dingxiang_tag"
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="@string/dingxiang_amount"
+                            android:textColor="@color/white"
+                            android:textSize="12sp" />
+
+                        <TextView
+                            android:layout_width="0dp"
+                            android:layout_height="wrap_content"
+                            android:layout_weight="1"
+                            android:gravity="center"
+                            android:text="@string/recharge_amount"
+                            android:textColor="@color/white"
+                            android:textSize="12sp" />
+
+                    </LinearLayout>
+                </android.support.constraint.ConstraintLayout>
+
+                <TextView
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginStart="16dp"
+                    android:layout_marginTop="7dp"
+                    android:text="管家推介"
+                    android:textColor="#ff333333"
+                    android:textSize="14sp" />
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="16dp"
+                    android:orientation="horizontal">
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:drawableTop="@mipmap/ic_coupons"
+                        android:drawablePadding="10dp"
+                        android:gravity="center"
+                        android:onClick="onClickCoupons"
+                        android:text="优惠购物"
+                        android:textColor="#ff333333"
+                        android:textSize="12sp" />
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:drawableTop="@mipmap/ic_vip"
+                        android:drawablePadding="10dp"
+                        android:gravity="center"
+                        android:onClick="onClickVip"
+                        android:text="VIP"
+                        android:textColor="#ff333333"
+                        android:textSize="12sp" />
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:drawableTop="@mipmap/ic_game_recharge"
+                        android:drawablePadding="10dp"
+                        android:gravity="center"
+                        android:onClick="onClickGameRecharge"
+                        android:text="游戏直充"
+                        android:textColor="#ff333333"
+                        android:textSize="12sp" />
+
+                    <TextView
+                        android:layout_width="0dp"
+                        android:layout_height="wrap_content"
+                        android:layout_weight="1"
+                        android:drawableTop="@mipmap/ic_long_mao"
+                        android:drawablePadding="10dp"
+                        android:gravity="center"
+                        android:onClick="onClickLongMao"
+                        android:text="龙猫电竞"
+                        android:textColor="#ff333333"
+                        android:textSize="12sp" />
+                </LinearLayout>
+
+                <android.support.design.widget.TabLayout
+                    android:id="@+id/indicator"
+                    android:layout_width="match_parent"
+                    android:layout_height="50dp"
+                    android:layout_marginTop="@dimen/content_padding_20"
+                    android:background="#F5F5F5"
+                    app:tabGravity="center"
+                    app:tabIndicatorColor="#4bc1fe"
+                    app:tabIndicatorHeight="0dp"
+                    app:tabMode="fixed"
+                    app:tabSelectedTextColor="@android:color/white"
+                    app:tabTextAppearance="@android:style/TextAppearance.Holo.Medium"
+                    app:tabTextColor="#444444" />
+
+                <com.kfzs.android.view.widget.WrapContentHeightViewPager
+                    android:id="@+id/pager"
+                    android:layout_width="match_parent"
+                    android:layout_height="0dip"
+                    android:layout_weight="1" />
+            </LinearLayout>
+        </android.support.v4.widget.NestedScrollView>
+    </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+
+</LinearLayout>

+ 31 - 0
app/src/main/res/layout/new_year_tab_item.xml

@@ -0,0 +1,31 @@
+<?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="50dp">
+
+    <View
+        android:id="@+id/tab_line"
+        android:layout_width="1dp"
+        android:layout_height="20dp"
+        android:layout_alignParentEnd="true"
+        android:layout_centerVertical="true"
+        android:background="#CCCCCC" />
+
+    <TextView
+        android:id="@+id/tabtext"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_centerHorizontal="true"
+        android:layout_toStartOf="@id/tab_line"
+        android:gravity="center"
+        android:text="TAB"
+        android:textColor="@color/new_year_selector_color_tab2"
+        android:textSize="15sp" />
+
+    <View
+        android:layout_width="15dp"
+        android:layout_height="15dp"
+        android:layout_alignParentBottom="true"
+        android:layout_centerHorizontal="true"
+        android:background="@drawable/selector_tab_triangle" />
+</RelativeLayout>

+ 19 - 0
app/src/main/res/layout/pay_result.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+
+	android:layout_width="fill_parent"
+	android:layout_height="fill_parent"
+	android:orientation="vertical"
+	android:gravity="center_horizontal"
+	android:background="@color/white">
+    
+	<TextView
+	    android:layout_width="fill_parent"
+	 	android:layout_height="fill_parent"
+		android:gravity="center"
+	 	android:textColor="#ff000000"
+	 	android:textSize="20dp"
+	 	android:text="@string/pay_result_tip"/>
+	
+</LinearLayout>

+ 4 - 10
app/src/main/res/layout/recharge_act_layout.xml

@@ -79,19 +79,13 @@
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
                         android:text="支付方式" />
                         android:text="支付方式" />
 
 
-                    <com.sheep.gamegroup.util.MyGridview
-                        android:id="@+id/recharge_greidview"
-                        android:layout_width="wrap_content"
+                    <android.support.v7.widget.RecyclerView
+                        android:id="@+id/act_ral_pay_type_rv"
+                        android:layout_width="match_parent"
                         android:layout_height="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginLeft="@dimen/content_padding_65"
                         android:layout_marginLeft="@dimen/content_padding_65"
                         android:layout_marginRight="@dimen/content_padding_65"
                         android:layout_marginRight="@dimen/content_padding_65"
-                        android:layout_marginTop="@dimen/content_padding_20"
-                        android:background="@color/white"
-                        android:gravity="center_horizontal"
-                        android:listSelector="@color/transparent"
-                        android:numColumns="1"
-                        android:scrollbars="none"
-                        android:visibility="visible" />
+                        android:layout_marginTop="@dimen/content_padding_20"/>
                 </LinearLayout>
                 </LinearLayout>
             </LinearLayout>
             </LinearLayout>
 
 

+ 2 - 1
app/src/main/res/layout/try_makemoney_item_recommend.xml

@@ -218,7 +218,8 @@
                 android:minWidth="@dimen/find_bt_with"
                 android:minWidth="@dimen/find_bt_with"
                 android:text="会员:+11元"
                 android:text="会员:+11元"
                 android:textColor="#C3995E"
                 android:textColor="#C3995E"
-                android:textSize="10sp" />
+                android:textSize="10sp"
+                android:visibility="gone"/>
             <View
             <View
                 android:layout_width="1dp"
                 android:layout_width="1dp"
                 android:layout_height="0dp"
                 android:layout_height="0dp"

+ 0 - 1
app/src/main/res/layout/view_float_title_card.xml

@@ -10,7 +10,6 @@
         android:layout_width="match_parent"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_height="wrap_content"
         android:orientation="vertical"
         android:orientation="vertical"
-        android:layout_marginTop="44dp"
         android:background="@color/white"
         android:background="@color/white"
         android:paddingBottom="10dp">
         android:paddingBottom="10dp">
 
 

BIN
app/src/main/res/mipmap-xhdpi/icon.png


BIN
app/src/main/res/mipmap-xhdpi/icon_new_year.png


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


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


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


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

@@ -8,7 +8,7 @@
     <!--digits-->
     <!--digits-->
     <string name="digits_username">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
     <string name="digits_username">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
     <string name="digits_captcha">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
     <string name="digits_captcha">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</string>
-    <string name="digits_password">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~@#$%^*()-=_+</string>
+    <string name="digits_password">abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789~@#$%^*()-=_+.</string>
 
 
     <!--img desc-->
     <!--img desc-->
 
 

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

@@ -13,7 +13,7 @@
 
 
     <string name="total_money_lable">绵羊币\n总余额:</string>
     <string name="total_money_lable">绵羊币\n总余额:</string>
     <string name="total_money">%s元</string>
     <string name="total_money">%s元</string>
-    <string name="task_reward">奖励额</string>
+    <string name="task_reward">奖励额</string>
     <string name="agent_extract">推广提成</string>
     <string name="agent_extract">推广提成</string>
     <string name="recharge_amount">充值余额</string>
     <string name="recharge_amount">充值余额</string>
     <string name="available_amount">可提现金额:%s元</string>
     <string name="available_amount">可提现金额:%s元</string>
@@ -214,4 +214,7 @@
     <string name="yf_shop_ask_tip">恭喜%s用户,元旦邀新活动,你已获得礼品,请前往填写收件信息,羊羊乐园的工作人员将尽快的为你安排发货,请耐心等待!</string>
     <string name="yf_shop_ask_tip">恭喜%s用户,元旦邀新活动,你已获得礼品,请前往填写收件信息,羊羊乐园的工作人员将尽快的为你安排发货,请耐心等待!</string>
     <string name="yf_shop_ask_tip_2">恭喜%s用户,元旦邀新活动,你已获得礼品。请耐心等待,羊羊乐园的工作人员将尽快的为你安排发货,!</string>
     <string name="yf_shop_ask_tip_2">恭喜%s用户,元旦邀新活动,你已获得礼品。请耐心等待,羊羊乐园的工作人员将尽快的为你安排发货,!</string>
 
 
+    <!-- WXPayEntryActivity -->
+    <string name="pay_result_tip">这个界面用于显示第三方app通过微信支付的结果</string>
+    <string name="pay_result_callback_msg" formatted="false">微信支付结果:%s</string>
 </resources>
 </resources>

+ 6 - 0
app/src/main/res/values/styles.xml

@@ -62,6 +62,12 @@
         <item name="android:textSize">@dimen/text_size_13</item>
         <item name="android:textSize">@dimen/text_size_13</item>
         <item name="android:textColor">@color/black_6_3</item>
         <item name="android:textColor">@color/black_6_3</item>
     </style>
     </style>
+    <style name="login_edit_style_name" parent="login_edit_style">
+        <item name="android:digits">@string/digits_username</item>
+    </style>
+    <style name="login_edit_style_pwd" parent="login_edit_style">
+        <item name="android:digits">@string/digits_password</item>
+    </style>
 
 
     <style name="login_separetor_line_style">
     <style name="login_separetor_line_style">
         <item name="android:layout_width">match_parent</item>
         <item name="android:layout_width">match_parent</item>

+ 7 - 0
app/src/sheep/java/com/sheep/jiuyan/samllsheep/wxapi/WXEntryActivity.java

@@ -0,0 +1,7 @@
+package com.sheep.jiuyan.samllsheep.wxapi;
+import com.umeng.socialize.weixin.view.WXCallbackActivity;
+
+public class WXEntryActivity extends WXCallbackActivity {
+
+
+}

+ 7 - 0
app/src/sheep/java/com/sheep/jiuyan/samllsheep/wxapi/WXPayEntryActivity.java

@@ -0,0 +1,7 @@
+package com.sheep.jiuyan.samllsheep.wxapi;
+
+
+import com.sheep.gamegroup.module.pay.activity.SheepWXPayEntryActivity;
+
+public class WXPayEntryActivity extends SheepWXPayEntryActivity {
+}

+ 7 - 0
app/src/sheeptestjiguang/java/com/sheep/jiuyan/samllsheep/test/wxapi/WXEntryActivity.java

@@ -0,0 +1,7 @@
+package com.sheep.jiuyan.samllsheep.wxapi;
+import com.umeng.socialize.weixin.view.WXCallbackActivity;
+
+public class WXEntryActivity extends WXCallbackActivity {
+
+
+}

+ 7 - 0
app/src/sheeptestjiguang/java/com/sheep/jiuyan/samllsheep/test/wxapi/WXPayEntryActivity.java

@@ -0,0 +1,7 @@
+package com.sheep.jiuyan.samllsheep.test.wxapi;
+
+
+import com.sheep.gamegroup.module.pay.activity.SheepWXPayEntryActivity;
+
+public class WXPayEntryActivity extends SheepWXPayEntryActivity {
+}

+ 6 - 0
skin_newYear/src/main/res/drawable/shape_gradient_main.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+
+    <item android:drawable="@drawable/skin_drawable_selector_bg_home_search"/>
+
+</selector>

BIN
skin_newYear/src/main/res/mipmap-xxhdpi/audit_top_bg.png


BIN
skin_newYear/src/main/res/mipmap-xxhdpi/ic_coupons.png


BIN
skin_newYear/src/main/res/mipmap-xxhdpi/ic_game_recharge.png


BIN
skin_newYear/src/main/res/mipmap-xxhdpi/ic_long_mao.png


BIN
skin_newYear/src/main/res/mipmap-xxhdpi/ic_vip.png