Преглед изворни кода

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

hanjing пре 7 година
родитељ
комит
a11e7ef090
25 измењених фајлова са 379 додато и 244 уклоњено
  1. 15 15
      app/src/main/java/com/sheep/gamegroup/greendao/download/DaoMaster.java
  2. 61 61
      app/src/main/java/com/sheep/gamegroup/greendao/download/DaoSession.java
  3. 1 1
      app/src/main/java/com/sheep/gamegroup/module/ad_htxd/model/ArticleAd.java
  4. 5 2
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameCenter.java
  5. 1 1
      app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtPlayGame.java
  6. 6 1
      app/src/main/java/com/sheep/gamegroup/module/game/model/GameCenterType.java
  7. 59 43
      app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java
  8. 79 70
      app/src/main/java/com/sheep/gamegroup/util/ConnectAddress.java
  9. 6 0
      app/src/main/java/com/sheep/gamegroup/util/StringUtils.java
  10. 12 5
      app/src/main/java/com/sheep/gamegroup/view/activity/ActMain.java
  11. 1 1
      app/src/main/java/com/sheep/gamegroup/view/activity/ActSignCard.java
  12. 6 3
      app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java
  13. 23 16
      app/src/main/java/com/sheep/gamegroup/view/activity/SplashAct.java
  14. 1 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtAskGetMoneyRank.java
  15. 16 0
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtGiftCenter.java
  16. 10 1
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtPersonalCenter.java
  17. 3 3
      app/src/main/java/com/sheep/gamegroup/view/fragment/FgtSmallSheep.java
  18. 2 0
      app/src/main/java/com/sheep/jiuyan/samllsheep/Config.java
  19. 27 4
      app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java
  20. 19 9
      app/src/main/res/layout/dialog_parent_update.xml
  21. 20 0
      app/src/main/res/layout/fgt_personalcenter_item_center_one.xml
  22. 1 1
      app/src/main/res/layout/fgt_play_game.xml
  23. 1 2
      app/src/main/res/layout/include_home_search.xml
  24. 3 3
      app/src/main/res/values/strings.xml
  25. 1 1
      gradle.properties

+ 15 - 15
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoMaster.java

@@ -21,26 +21,26 @@ public class DaoMaster extends AbstractDaoMaster {
 
     /** Creates underlying database table using DAOs. */
     public static void createAllTables(Database db, boolean ifNotExists) {
-        ProcessRecordDao.createTable(db, ifNotExists);
-        AppdownloadBeanDao.createTable(db, ifNotExists);
-        SdkLoginUserDao.createTable(db, ifNotExists);
-        ScreenShotRecordDao.createTable(db, ifNotExists);
         AcceptTaskRecordDao.createTable(db, ifNotExists);
         AccountDao.createTable(db, ifNotExists);
-        SearchRecordDao.createTable(db, ifNotExists);
+        AppdownloadBeanDao.createTable(db, ifNotExists);
         DownLoadInfoDao.createTable(db, ifNotExists);
+        ProcessRecordDao.createTable(db, ifNotExists);
+        ScreenShotRecordDao.createTable(db, ifNotExists);
+        SdkLoginUserDao.createTable(db, ifNotExists);
+        SearchRecordDao.createTable(db, ifNotExists);
     }
 
     /** Drops underlying database table using DAOs. */
     public static void dropAllTables(Database db, boolean ifExists) {
-        ProcessRecordDao.dropTable(db, ifExists);
-        AppdownloadBeanDao.dropTable(db, ifExists);
-        SdkLoginUserDao.dropTable(db, ifExists);
-        ScreenShotRecordDao.dropTable(db, ifExists);
         AcceptTaskRecordDao.dropTable(db, ifExists);
         AccountDao.dropTable(db, ifExists);
-        SearchRecordDao.dropTable(db, ifExists);
+        AppdownloadBeanDao.dropTable(db, ifExists);
         DownLoadInfoDao.dropTable(db, ifExists);
+        ProcessRecordDao.dropTable(db, ifExists);
+        ScreenShotRecordDao.dropTable(db, ifExists);
+        SdkLoginUserDao.dropTable(db, ifExists);
+        SearchRecordDao.dropTable(db, ifExists);
     }
 
     /**
@@ -59,14 +59,14 @@ public class DaoMaster extends AbstractDaoMaster {
 
     public DaoMaster(Database db) {
         super(db, SCHEMA_VERSION);
-        registerDaoClass(ProcessRecordDao.class);
-        registerDaoClass(AppdownloadBeanDao.class);
-        registerDaoClass(SdkLoginUserDao.class);
-        registerDaoClass(ScreenShotRecordDao.class);
         registerDaoClass(AcceptTaskRecordDao.class);
         registerDaoClass(AccountDao.class);
-        registerDaoClass(SearchRecordDao.class);
+        registerDaoClass(AppdownloadBeanDao.class);
         registerDaoClass(DownLoadInfoDao.class);
+        registerDaoClass(ProcessRecordDao.class);
+        registerDaoClass(ScreenShotRecordDao.class);
+        registerDaoClass(SdkLoginUserDao.class);
+        registerDaoClass(SearchRecordDao.class);
     }
 
     public DaoSession newSession() {

+ 61 - 61
app/src/main/java/com/sheep/gamegroup/greendao/download/DaoSession.java

@@ -8,23 +8,23 @@ import org.greenrobot.greendao.database.Database;
 import org.greenrobot.greendao.identityscope.IdentityScopeType;
 import org.greenrobot.greendao.internal.DaoConfig;
 
-import com.sheep.gamegroup.greendao.download.ProcessRecord;
-import com.sheep.gamegroup.greendao.download.AppdownloadBean;
-import com.sheep.gamegroup.greendao.download.SdkLoginUser;
-import com.sheep.gamegroup.greendao.download.ScreenShotRecord;
 import com.sheep.gamegroup.greendao.download.AcceptTaskRecord;
 import com.sheep.gamegroup.greendao.download.Account;
-import com.sheep.gamegroup.greendao.download.SearchRecord;
+import com.sheep.gamegroup.greendao.download.AppdownloadBean;
 import com.sheep.gamegroup.greendao.download.DownLoadInfo;
+import com.sheep.gamegroup.greendao.download.ProcessRecord;
+import com.sheep.gamegroup.greendao.download.ScreenShotRecord;
+import com.sheep.gamegroup.greendao.download.SdkLoginUser;
+import com.sheep.gamegroup.greendao.download.SearchRecord;
 
-import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
-import com.sheep.gamegroup.greendao.download.AppdownloadBeanDao;
-import com.sheep.gamegroup.greendao.download.SdkLoginUserDao;
-import com.sheep.gamegroup.greendao.download.ScreenShotRecordDao;
 import com.sheep.gamegroup.greendao.download.AcceptTaskRecordDao;
 import com.sheep.gamegroup.greendao.download.AccountDao;
-import com.sheep.gamegroup.greendao.download.SearchRecordDao;
+import com.sheep.gamegroup.greendao.download.AppdownloadBeanDao;
 import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
+import com.sheep.gamegroup.greendao.download.ProcessRecordDao;
+import com.sheep.gamegroup.greendao.download.ScreenShotRecordDao;
+import com.sheep.gamegroup.greendao.download.SdkLoginUserDao;
+import com.sheep.gamegroup.greendao.download.SearchRecordDao;
 
 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
 
@@ -35,112 +35,112 @@ import com.sheep.gamegroup.greendao.download.DownLoadInfoDao;
  */
 public class DaoSession extends AbstractDaoSession {
 
-    private final DaoConfig processRecordDaoConfig;
-    private final DaoConfig appdownloadBeanDaoConfig;
-    private final DaoConfig sdkLoginUserDaoConfig;
-    private final DaoConfig screenShotRecordDaoConfig;
     private final DaoConfig acceptTaskRecordDaoConfig;
     private final DaoConfig accountDaoConfig;
-    private final DaoConfig searchRecordDaoConfig;
+    private final DaoConfig appdownloadBeanDaoConfig;
     private final DaoConfig downLoadInfoDaoConfig;
+    private final DaoConfig processRecordDaoConfig;
+    private final DaoConfig screenShotRecordDaoConfig;
+    private final DaoConfig sdkLoginUserDaoConfig;
+    private final DaoConfig searchRecordDaoConfig;
 
-    private final ProcessRecordDao processRecordDao;
-    private final AppdownloadBeanDao appdownloadBeanDao;
-    private final SdkLoginUserDao sdkLoginUserDao;
-    private final ScreenShotRecordDao screenShotRecordDao;
     private final AcceptTaskRecordDao acceptTaskRecordDao;
     private final AccountDao accountDao;
-    private final SearchRecordDao searchRecordDao;
+    private final AppdownloadBeanDao appdownloadBeanDao;
     private final DownLoadInfoDao downLoadInfoDao;
+    private final ProcessRecordDao processRecordDao;
+    private final ScreenShotRecordDao screenShotRecordDao;
+    private final SdkLoginUserDao sdkLoginUserDao;
+    private final SearchRecordDao searchRecordDao;
 
     public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
             daoConfigMap) {
         super(db);
 
-        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
-        processRecordDaoConfig.initIdentityScope(type);
+        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
+        acceptTaskRecordDaoConfig.initIdentityScope(type);
+
+        accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
+        accountDaoConfig.initIdentityScope(type);
 
         appdownloadBeanDaoConfig = daoConfigMap.get(AppdownloadBeanDao.class).clone();
         appdownloadBeanDaoConfig.initIdentityScope(type);
 
-        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
-        sdkLoginUserDaoConfig.initIdentityScope(type);
+        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
+        downLoadInfoDaoConfig.initIdentityScope(type);
+
+        processRecordDaoConfig = daoConfigMap.get(ProcessRecordDao.class).clone();
+        processRecordDaoConfig.initIdentityScope(type);
 
         screenShotRecordDaoConfig = daoConfigMap.get(ScreenShotRecordDao.class).clone();
         screenShotRecordDaoConfig.initIdentityScope(type);
 
-        acceptTaskRecordDaoConfig = daoConfigMap.get(AcceptTaskRecordDao.class).clone();
-        acceptTaskRecordDaoConfig.initIdentityScope(type);
-
-        accountDaoConfig = daoConfigMap.get(AccountDao.class).clone();
-        accountDaoConfig.initIdentityScope(type);
+        sdkLoginUserDaoConfig = daoConfigMap.get(SdkLoginUserDao.class).clone();
+        sdkLoginUserDaoConfig.initIdentityScope(type);
 
         searchRecordDaoConfig = daoConfigMap.get(SearchRecordDao.class).clone();
         searchRecordDaoConfig.initIdentityScope(type);
 
-        downLoadInfoDaoConfig = daoConfigMap.get(DownLoadInfoDao.class).clone();
-        downLoadInfoDaoConfig.initIdentityScope(type);
-
-        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
-        appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
-        sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
-        screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);
         acceptTaskRecordDao = new AcceptTaskRecordDao(acceptTaskRecordDaoConfig, this);
         accountDao = new AccountDao(accountDaoConfig, this);
-        searchRecordDao = new SearchRecordDao(searchRecordDaoConfig, this);
+        appdownloadBeanDao = new AppdownloadBeanDao(appdownloadBeanDaoConfig, this);
         downLoadInfoDao = new DownLoadInfoDao(downLoadInfoDaoConfig, this);
+        processRecordDao = new ProcessRecordDao(processRecordDaoConfig, this);
+        screenShotRecordDao = new ScreenShotRecordDao(screenShotRecordDaoConfig, this);
+        sdkLoginUserDao = new SdkLoginUserDao(sdkLoginUserDaoConfig, this);
+        searchRecordDao = new SearchRecordDao(searchRecordDaoConfig, this);
 
-        registerDao(ProcessRecord.class, processRecordDao);
-        registerDao(AppdownloadBean.class, appdownloadBeanDao);
-        registerDao(SdkLoginUser.class, sdkLoginUserDao);
-        registerDao(ScreenShotRecord.class, screenShotRecordDao);
         registerDao(AcceptTaskRecord.class, acceptTaskRecordDao);
         registerDao(Account.class, accountDao);
-        registerDao(SearchRecord.class, searchRecordDao);
+        registerDao(AppdownloadBean.class, appdownloadBeanDao);
         registerDao(DownLoadInfo.class, downLoadInfoDao);
+        registerDao(ProcessRecord.class, processRecordDao);
+        registerDao(ScreenShotRecord.class, screenShotRecordDao);
+        registerDao(SdkLoginUser.class, sdkLoginUserDao);
+        registerDao(SearchRecord.class, searchRecordDao);
     }
     
     public void clear() {
-        processRecordDaoConfig.clearIdentityScope();
-        appdownloadBeanDaoConfig.clearIdentityScope();
-        sdkLoginUserDaoConfig.clearIdentityScope();
-        screenShotRecordDaoConfig.clearIdentityScope();
         acceptTaskRecordDaoConfig.clearIdentityScope();
         accountDaoConfig.clearIdentityScope();
-        searchRecordDaoConfig.clearIdentityScope();
+        appdownloadBeanDaoConfig.clearIdentityScope();
         downLoadInfoDaoConfig.clearIdentityScope();
+        processRecordDaoConfig.clearIdentityScope();
+        screenShotRecordDaoConfig.clearIdentityScope();
+        sdkLoginUserDaoConfig.clearIdentityScope();
+        searchRecordDaoConfig.clearIdentityScope();
     }
 
-    public ProcessRecordDao getProcessRecordDao() {
-        return processRecordDao;
+    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
+        return acceptTaskRecordDao;
+    }
+
+    public AccountDao getAccountDao() {
+        return accountDao;
     }
 
     public AppdownloadBeanDao getAppdownloadBeanDao() {
         return appdownloadBeanDao;
     }
 
-    public SdkLoginUserDao getSdkLoginUserDao() {
-        return sdkLoginUserDao;
+    public DownLoadInfoDao getDownLoadInfoDao() {
+        return downLoadInfoDao;
     }
 
-    public ScreenShotRecordDao getScreenShotRecordDao() {
-        return screenShotRecordDao;
+    public ProcessRecordDao getProcessRecordDao() {
+        return processRecordDao;
     }
 
-    public AcceptTaskRecordDao getAcceptTaskRecordDao() {
-        return acceptTaskRecordDao;
+    public ScreenShotRecordDao getScreenShotRecordDao() {
+        return screenShotRecordDao;
     }
 
-    public AccountDao getAccountDao() {
-        return accountDao;
+    public SdkLoginUserDao getSdkLoginUserDao() {
+        return sdkLoginUserDao;
     }
 
     public SearchRecordDao getSearchRecordDao() {
         return searchRecordDao;
     }
 
-    public DownLoadInfoDao getDownLoadInfoDao() {
-        return downLoadInfoDao;
-    }
-
 }

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

@@ -22,7 +22,7 @@ public class ArticleAd extends Article {
 
     public static final String FEED = "1D0JLRMA102V277730B60000552042FE";
     public static final int INDEX = 4;//放在position为4的位置,即第5个
-    public static final boolean showAd = true;//TestUtil.isSheep();//是否显示广告
+    public static final boolean showAd = TestUtil.isSheep();//是否显示广告
 
     private NativeADDataInfo nativeADDataInfo;
     private PNative pNative;

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

@@ -7,14 +7,16 @@ import android.view.View;
 import android.widget.Button;
 import android.widget.ImageButton;
 
+import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.KeyEventUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.activity.ActMain;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
-import com.sheep.gamegroup.view.fragment.FgtDownloadWelfareList;
+import com.sheep.gamegroup.view.fragment.FgtGiftCenter;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
+import com.sheep.jiuyan.samllsheep.utils.G;
 
 import butterknife.BindView;
 import butterknife.OnClick;
@@ -54,9 +56,10 @@ public class FgtGameCenter extends BaseFragment {
         backBtn.setVisibility((getActivity() instanceof ActMain) ? View.GONE : View.VISIBLE);
         TitleFragmentListAdapter mAdapter = new TitleFragmentListAdapter(getChildFragmentManager());
         mAdapter.add(new FgtPlayGame(), "玩转游戏");
-        mAdapter.add(new FgtDownloadWelfareList(), "礼包中心");
+        mAdapter.add(new FgtGiftCenter(), "礼包中心");
         pager.setAdapter(mAdapter);
         indicator.setupWithViewPager(pager);
+        CommonUtil.getInstance().reflex(indicator, getActivity(), false, G.WIDTH - G.getRealPix(144));
         pager.setOffscreenPageLimit(mAdapter.getCount());
         pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
             @Override

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

@@ -69,7 +69,7 @@ public class FgtPlayGame extends BaseFragment {
     //绵羊新游、免费道具、绵羊推荐、排行榜
     private List<GameCenterType> gameCenterList = new ArrayList<>();
     public static final String[] GAME_CENTER_TYPE_NAME = {"绵羊新游", "会员推荐", "绵羊推荐", "排行榜"};
-    public static final String[] GAME_CENTER_TYPE_ICON_NAME = {"myxy", "免费道具", "绵羊推荐", "排行榜"};
+    public static final String[] GAME_CENTER_TYPE_ICON_NAME = {"myxy", "hytj", "mytj", "phb"};
     public static final int[] GAME_CENTER_TYPE_ID = {1, 3, 2, -1};//1:绵羊新游 2:绵羊推荐 3:免费道具
     //预下载和tag列表的数据
     private List<ListTypeList<GameEntity, GameListType>> gameEntityListx = new ArrayList<>();

+ 6 - 1
app/src/main/java/com/sheep/gamegroup/module/game/model/GameCenterType.java

@@ -1,5 +1,6 @@
 package com.sheep.gamegroup.module.game.model;
 
+import com.sheep.gamegroup.util.TestUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 
 /**
@@ -37,6 +38,10 @@ public class GameCenterType {
     }
 
     public String getIconUrl() {
-        return ViewUtil.getNetImgByName(iconName);
+        String time = "_201902201537";
+        if(TestUtil.isTest()){
+            return String.format("http://10.8.220.248/shared/other/%s%s.png", iconName, time);
+        }
+        return ViewUtil.getNetImgByName(iconName + time);
     }
 }

+ 59 - 43
app/src/main/java/com/sheep/gamegroup/util/CommonUtil.java

@@ -58,6 +58,7 @@ import com.sheep.gamegroup.model.entity.TaskChild;
 import com.sheep.gamegroup.model.entity.TaskDescEntity;
 import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.entity.UserEntity;
+import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.model.entity.WithdrawalEty;
 import com.sheep.gamegroup.model.entity.XiaomiGameEntity;
 import com.sheep.gamegroup.model.util.EntityUtils;
@@ -1704,7 +1705,7 @@ public class CommonUtil {
      * @param tabLayout
      */
     public void reflex(final TabLayout tabLayout, final Context context) {
-        reflex(tabLayout, context, false);
+        reflex(tabLayout, context, false, 0);
     }
 
     /**
@@ -1712,60 +1713,69 @@ public class CommonUtil {
      *
      * @param tabLayout
      */
-    public void reflex(final TabLayout tabLayout, final Context context, final boolean reMeasure) {
+    public void reflex(final TabLayout tabLayout, final Context context, boolean reMeasure) {
+        reflex(tabLayout, context, reMeasure, 0);
+    }
+
+    /**
+     * 通过反射调整tabLayout中下划线的宽度
+     *
+     * @param tabLayout
+     */
+    public void reflex(final TabLayout tabLayout, final Context context, final boolean reMeasure, int tw) {
         //了解源码得知 线的宽度是根据 tabView的宽度来设置的
-        tabLayout.post(new Runnable() {
-            @Override
-            public void run() {
-                try {
-                    //拿到tabLayout的mTabStrip属性
-                    LinearLayout mTabStrip = (LinearLayout) tabLayout.getChildAt(0);
+        tabLayout.post(() -> {
+            try {
+                //拿到tabLayout的mTabStrip属性
+                LinearLayout mTabStrip = (LinearLayout) tabLayout.getChildAt(0);
 
 //                    int dp10 = dip2px(tabLayout.getContext(), 10);
-                    int add = context.getResources().getDimensionPixelSize(R.dimen.content_padding_10);
-                    int count = mTabStrip.getChildCount();
-                    int fillCount = Math.min(5, count);//一屏的个数
+                int add = context.getResources().getDimensionPixelSize(R.dimen.content_padding_10);
+                int count = mTabStrip.getChildCount();
+                int fillCount = Math.min(5, count);//一屏的个数
 
-                    int tabWidth = tabLayout.getWidth();
-                    if (tabWidth == 0) {
-                        tabWidth = G.WIDTH;
-                    }
-                    for (int i = 0; i < count; i++) {
-                        View tabView = mTabStrip.getChildAt(i);
+                int tabWidth = tw;
+                if (tabWidth == 0) {
+                    tabWidth = tabLayout.getWidth();
+                }
+                if (tabWidth == 0) {
+                    tabWidth = G.WIDTH;
+                }
+                for (int i = 0; i < count; i++) {
+                    View tabView = mTabStrip.getChildAt(i);
 
-                        //拿到tabView的mTextView属性  tab的字数不固定一定用反射取mTextView
-                        Field mTextViewField = tabView.getClass().getDeclaredField("textView");//com.android.support:design:28.0.0
+                    //拿到tabView的mTextView属性  tab的字数不固定一定用反射取mTextView
+                    Field mTextViewField = tabView.getClass().getDeclaredField("textView");//com.android.support:design:28.0.0
 //                        Field mTextViewField = tabView.getClass().getDeclaredField("mTextView");//com.android.support:design:27.1.0
-                        mTextViewField.setAccessible(true);
+                    mTextViewField.setAccessible(true);
 
-                        TextView mTextView = (TextView) mTextViewField.get(tabView);
-
-                        tabView.setPadding(0, 0, 0, 0);
-
-                        //因为我想要的效果是   字多宽线就多宽,所以测量mTextView的宽度
-                        int width = 0;
-                        width = mTextView.getWidth();
-                        if (width == 0 || reMeasure) {
-                            mTextView.measure(0, 0);
-                            width = mTextView.getMeasuredWidth();
-                        }
+                    TextView mTextView = (TextView) mTextViewField.get(tabView);
 
-                        //设置tab左右间距为10dp  注意这里不能使用Padding 因为源码中线的宽度是根据 tabView的宽度来设置的
-                        LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) tabView.getLayoutParams();
-                        params.width = width;
-                        int margin = (tabWidth - fillCount * width - 2 * add) / (fillCount * 2);
-                        params.leftMargin = margin + (i == 0 ? add : 0);
-                        params.rightMargin = margin + (i + 1 == count ? add : 0);
-                        tabView.setLayoutParams(params);
+                    tabView.setPadding(0, 0, 0, 0);
 
-                        tabView.invalidate();
+                    //因为我想要的效果是   字多宽线就多宽,所以测量mTextView的宽度
+                    int width = 0;
+                    width = mTextView.getWidth();
+                    if (width == 0 || reMeasure) {
+                        mTextView.measure(0, 0);
+                        width = mTextView.getMeasuredWidth();
                     }
 
-                } catch (NoSuchFieldException e) {
-                    e.printStackTrace();
-                } catch (IllegalAccessException e) {
-                    e.printStackTrace();
+                    //设置tab左右间距为10dp  注意这里不能使用Padding 因为源码中线的宽度是根据 tabView的宽度来设置的
+                    LinearLayout.LayoutParams params = (LinearLayout.LayoutParams) tabView.getLayoutParams();
+                    params.width = width;
+                    int margin = (tabWidth - fillCount * width - 2 * add) / (fillCount * 2);
+                    params.leftMargin = margin + (i == 0 ? add : 0);
+                    params.rightMargin = margin + (i + 1 == count ? add : 0);
+                    tabView.setLayoutParams(params);
+
+                    tabView.invalidate();
                 }
+
+            } catch (NoSuchFieldException e) {
+                e.printStackTrace();
+            } catch (IllegalAccessException e) {
+                e.printStackTrace();
             }
         });
 
@@ -2667,6 +2677,12 @@ public class CommonUtil {
                                 });
                 return true;
             }
+        } else if(url.contains("/#/placing-orders/") && url.contains("?merchandise_id=")) {//http://10.8.220.248:8080/#/placing-orders/6504256768225316864?merchandise_id=2
+            closeListener.onClick(null);
+            ViewUtil.showMsgDialog(SheepApp.getInstance().getCurrentActivity(), new DialogConfig().setMsg("你有一个拼单邀请,是否立即前往?")
+                .setBtnLeftText("取消").setBtnRightText("前往")
+                .setBtnRightOnClickListener(view -> Jump2View.getInstance().goWeb(SheepApp.getInstance().getCurrentActivity(), new WebParams(url).setTitle("爱奇艺VIP会员卡"))));
+            return true;
         }
         return false;
     }

+ 79 - 70
app/src/main/java/com/sheep/gamegroup/util/ConnectAddress.java

@@ -11,86 +11,89 @@ import com.sheep.jiuyan.samllsheep.SheepApp;
  */
 
 public enum ConnectAddress {
-    dangyongfeng {
-
-        @Override
-        public String getAppUrl() {
-            return "http://10.8.220.237:8010/";
-        }
-        @Override
-        public String getName() {
-            return "党勇锋";
-        }
-    },
-    ruanlang {
-
-        @Override
-        public String getAppUrl() {
-//            return "http://10.8.240.156:8080/";
-            return "http://10.8.220.249:8080/";
-        }
-        @Override
-        public String getName() {
-            return "阮浪";
-        }
-    },
+    //    dangyongfeng {
+//
+//        @Override
+//        public String getAppUrl() {
+//            return "http://10.8.220.237:8010/";
+//        }
+//        @Override
+//        public String getName() {
+//            return "党勇锋";
+//        }
+//    },
+//    ruanlang {
+//
+//        @Override
+//        public String getAppUrl() {
+////            return "http://10.8.240.156:8080/";
+//            return "http://10.8.220.249:8080/";
+//        }
+//        @Override
+//        public String getName() {
+//            return "阮浪";
+//        }
+//    },
+//    sheepmeien {
+//
+//        @Override
+//        public String getAppUrl() {
+////            return "http://10.8.210.229:8080/";
+////            return "http://10.8.210.243:8080/";
+//            return "http://10.8.210.235:8080/";
+//        }
+//        @Override
+//        public String getName() {
+//            return "梅恩";
+//        }
+//    },
+//    sheeptest {
+//
+//        @Override
+//        public String getAppUrl() {
+//            return "http://testnei.ss.kfzs.com/";
+//        }
+//        @Override
+//        public String getName() {
+//            return "黄海测试服";
+//        }
+//    },sheepfz {
+//
+//        @Override
+//        public String getAppUrl() {
+//            return "http://simul.ss.kfzs.com/";
+//        }
+//
+//        @Override
+//        public String getName() {
+//            return "正式服仿真";
+//        }
+//    },
     sheepxiexing {
-
         @Override
         public String getAppUrl() {
             return "http://10.8.220.239:8080/";
 //            return "http://10.8.220.245:8080/";
 //            return "http://10.8.220.229:8080/";
         }
-        @Override
-        public String getName() {
-            return "谢兴";
-        }
-    },sheepmeien {
 
         @Override
-        public String getAppUrl() {
-//            return "http://10.8.210.229:8080/";
-//            return "http://10.8.210.243:8080/";
-            return "http://10.8.210.235:8080/";
-        }
-        @Override
         public String getName() {
-            return "梅恩";
+            return "谢兴";
         }
-    },developSheeptest {
-
+    },
+    developSheeptest {
         @Override
         public String getAppUrl() {
             return "http://test.sheep.kfzs.com/";
         }
-        @Override
-        public String getName() {
-            return "开发测试服";
-        }
-    },sheeptest {
 
         @Override
-        public String getAppUrl() {
-            return "http://testnei.ss.kfzs.com/";
-        }
-        @Override
         public String getName() {
-            return "黄海测试服";
-        }
-    },sheepfz {
-
-        @Override
-        public String getAppUrl() {
-            return "http://simul.ss.kfzs.com/";
-        }
-
-        @Override
-        public String getName() {
-            return "正式服仿真";
+            return "开发测试服";
         }
-    },sheep {
-
+    },
+    sheep {
         @Override
         public String getAppUrl() {
             return "http://ss.17xmy.com/";
@@ -101,11 +104,12 @@ public enum ConnectAddress {
             return "正式服";
         }
 
-        public String getYfShotHomeSheep(){
+        public String getYfShotHomeSheep() {
             return Config.YF_SHOP_HOME_SHEEP;
         }
 
     };
+
     public abstract String getAppUrl();
 
     public abstract String getName();
@@ -118,38 +122,43 @@ public enum ConnectAddress {
     public int getPlatForm() {
         return getName().endsWith("IOS") ? 0 : 1;//0 ios, 1 android
     }
-    public boolean isUseUMStatistics(){//只有正式服不使用友盟统计
+
+    public boolean isUseUMStatistics() {//只有正式服不使用友盟统计
         return !getName().equals("sheep");
     }
-    public boolean isThisService(){
+
+    public boolean isThisService() {
         return !BuildConfig.DEBUG || SheepApp.getInstance().getConnectAddress() == this;
     }
-    public String getWorldCupUrl(){
+
+    public String getWorldCupUrl() {
         return "http://10.8.210.172:8080/#/";
     }
+
     //商城主页地址
-    public String getYfShotHomeSheep(){
+    public String getYfShotHomeSheep() {
         return Config.YF_SHOP_HOME_SHEEP_TEST;
     }
 
     public int getVersionType() {
-        switch (this){
+        switch (this) {
             case sheep:
                 return 1;
             default:
                 return 0;
         }
     }
+
     public String getPackageName() {
-        switch (this){
+        switch (this) {
             default:
                 return "com.sheep.jiuyan.samllsheep";
         }
     }
 
     public ConnectAddress getDefaultConnectAddress() {
-        if(TestUtil.isTest()){
-            if(ConfigUtil.getInstance().isFileExists()) {
+        if (TestUtil.isTest()) {
+            if (ConfigUtil.getInstance().isFileExists()) {
                 String flavor = ConfigUtil.getInstance().getItem(0);//第一行填写connectAddress的名字
                 try {
                     return ConnectAddress.valueOf(flavor);

+ 6 - 0
app/src/main/java/com/sheep/gamegroup/util/StringUtils.java

@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.GregorianCalendar;
 import java.util.Hashtable;
+import java.util.List;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -402,6 +403,11 @@ public class StringUtils {
         Uri uri = Uri.parse(url);
         return uri.getQueryParameter(key);
     }
+    //获取url中指定参数
+    public static List<String> getPathSegments(String url) {
+        Uri uri = Uri.parse(url);
+        return uri.getPathSegments();
+    }
 
     //图片url
     public static boolean isImageUrl(String url) {

+ 12 - 5
app/src/main/java/com/sheep/gamegroup/view/activity/ActMain.java

@@ -98,20 +98,27 @@ public class ActMain extends BaseActYmPermissionCheck {
     }
 
     private void setSystemUiVisibility() {
+        int flag =
+                View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
+//                    View.SYSTEM_UI_FLAG_VISIBLE;
+//                    View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR;
         //判断当前版本在4.0以上并且存在虚拟按键,否则不做操作
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && G.checkDeviceHasNavigationBar(this)) {
             //一定要判断是否存在按键,否则在没有按键的手机调用会影响别的功能。如之前没有考虑到,导致图传全屏变成小屏显示。
-            int flag =
-//                    View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
-                    View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR |
+//             if (isDark) {
+//                getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);//黑色
+//             } else {
+//                getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);//白色
+//             }
+            flag |=
                             View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
                             View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
                             View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | // hide
 //                    View.SYSTEM_UI_FLAG_FULLSCREEN | // hide status bar
                             View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
-            // 获取属性
-            getWindow().getDecorView().setSystemUiVisibility(flag);
         }
+        // 获取属性
+        getWindow().getDecorView().setSystemUiVisibility(flag);
     }
 
     @Override

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

@@ -335,7 +335,7 @@ public class ActSignCard extends BaseActivity {
                         "2、次日早上7:00-9:00时段为早起打卡时间,用户在此期间进入小绵羊点击打卡按钮则成功打卡成功打卡不仅能拿回您原来投入的1元动力金,还能瓜分当天所有打卡失败者的全部动力金。\n" +
                         "3、未在次日早上7:00-9:00内进行打卡视为打卡失败,打卡失败后您所投入的1元动力金将不予以退回,也不参与瓜分当天所有打卡失败者的全部动力金。\n" +
                         "4、奖金将会在当天9:00进行结算,于12小时内发放至你的账户。由于网络原因,部分用户可能出现到账不及时的情况,请与我们的客服联系(客服电话:4008-698-576)\n" +
-                        "本活动最终解释权归橙风有量科技有限公司所有"));
+                        "本活动最终解释权归聚享天天科技有限公司所有"));
     }
 
     private void joinChallenge() {

+ 6 - 3
app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java

@@ -13,21 +13,18 @@ import android.support.annotation.RequiresApi;
 import android.support.v7.app.ActionBar;
 import android.support.v7.app.AlertDialog;
 import android.text.TextUtils;
-import android.util.Log;
 import android.view.View;
 import android.view.animation.Animation;
 import android.view.animation.AnimationUtils;
 import android.widget.ImageView;
 import android.widget.ProgressBar;
 
-import com.sheep.gamegroup.db.DBUtils;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.module.webview.util.WebResourceRequestAdapter;
 import com.sheep.gamegroup.module.webview.util.WebResourceResponseAdapter;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.Constant;
 import com.sheep.gamegroup.util.DataUtil;
-import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.NetUtil;
@@ -305,6 +302,9 @@ public class ActWebX5 extends BaseActWeb {
         mWebView.setWebViewClient(new WebViewClient() {
             @Override
             public WebResourceResponse shouldInterceptRequest(WebView webView, String s) {
+                if(TestUtil.isDev()){
+                    return super.shouldInterceptRequest(webView, s);
+                }
                 if (s.contains("ssnocache=1")) return null;
                 LogUtil.println("ActWeb", "shouldInterceptRequest from cache", url);
                 return WebResourceResponseAdapter.adapter(WebViewCacheInterceptorInst.getInstance().interceptRequest(s));
@@ -312,6 +312,9 @@ public class ActWebX5 extends BaseActWeb {
 
             @Override
             public WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
+                if(TestUtil.isDev()){
+                    return super.shouldInterceptRequest(webView, webResourceRequest);
+                }
                 if (url.contains("ssnocache=1")) return null;
                 LogUtil.println("ActWeb", "shouldInterceptRequest from cache", url);
                 return WebResourceResponseAdapter.adapter(WebViewCacheInterceptorInst.getInstance().interceptRequest(WebResourceRequestAdapter.adapter(webResourceRequest)));

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

@@ -6,6 +6,7 @@ import android.content.DialogInterface;
 import android.content.Intent;
 import android.media.MediaPlayer;
 import android.net.Uri;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
@@ -24,13 +25,9 @@ import com.bumptech.glide.Glide;
 import com.sheep.gamegroup.absBase.BaseActivity;
 import com.sheep.gamegroup.model.entity.Advertising;
 import com.sheep.gamegroup.model.entity.BaseMessage;
-import com.sheep.gamegroup.model.entity.RouserArticlesEntity;
+import com.sheep.gamegroup.model.entity.DialogConfig;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
-import com.sheep.gamegroup.module.yf_shop.model.ReceiveCouponsCheckResq;
-import com.sheep.gamegroup.module.yf_shop.model.ReceiveCouponsResp;
-import com.sheep.gamegroup.util.ApiJSONUtil;
-import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
 import com.sheep.gamegroup.util.GlideImageLoader;
 import com.sheep.gamegroup.util.IDConstant;
@@ -39,10 +36,9 @@ import com.sheep.gamegroup.util.LogUtil;
 import com.sheep.gamegroup.util.RxjavaCountDownTimer;
 import com.sheep.gamegroup.util.SysAppUtil;
 import com.sheep.gamegroup.util.TestUtil;
-import com.sheep.jiuyan.samllsheep.BuildConfig;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
-import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
 
 import org.afinal.simplecache.ApiKey;
@@ -51,11 +47,10 @@ import java.util.List;
 
 import butterknife.BindView;
 import butterknife.OnClick;
-import pub.devrel.easypermissions.AfterPermissionGranted;
-import pub.devrel.easypermissions.EasyPermissions;
 import io.reactivex.android.schedulers.AndroidSchedulers;
 import io.reactivex.schedulers.Schedulers;
-import rx.functions.Action1;
+import pub.devrel.easypermissions.AfterPermissionGranted;
+import pub.devrel.easypermissions.EasyPermissions;
 
 import static com.sheep.gamegroup.util.CommonUtil.JUMP_FIND_ACT;
 import static com.sheep.gamegroup.util.CommonUtil.JUMP_FIND_GMAE;
@@ -152,7 +147,6 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                 case 1:
                     if (SysAppUtil.isNewSmallSheep() || TestUtil.isDev()) {//新版本只显示引导页面,不展示弹窗和开屏广告
                         isLoadingData = false;
-                        sendHandlerMessages(200);
                         initAdvertisement(false);//只更新,不加载,下次加载上次的数据
                     } else {
                         Advertising cacheAdvertising = DataUtil.getInstance().getCacheResult(ApiKey.advertisements(1), Advertising.class);
@@ -169,6 +163,7 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                             initAdvertisement(true);
                         }
                     }
+                    sendHandlerMessages(200);
                     break;
             }
 
@@ -186,8 +181,8 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                 .subscribe(new SheepSubscriber<BaseMessage>(activity) {
                     @Override
                     public void onNext(BaseMessage baseMessage) {
+                        isLoadingData = false;
                         if(isLoad) {
-                            isLoadingData = false;
                             advertising = baseMessage.getData(Advertising.class);
                             try {
                                 loadAdvertising();
@@ -199,10 +194,7 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
 
                     @Override
                     public void onError(BaseMessage baseMessage) {
-                        if(isLoad) {
-                            isLoadingData = false;
-                            sendHandlerMessages(10);
-                        }
+                        isLoadingData = false;
                     }
                 });
     }
@@ -244,6 +236,9 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
 
     @Override
     public void initData() {
+        if(isNotSupport()){
+            return;
+        }
         SheepApp.getInstance().getNetComponent().getApiService().checkUserFirst()
                 .subscribeOn(Schedulers.io())
                 .observeOn(AndroidSchedulers.mainThread())
@@ -264,6 +259,15 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
                 });
     }
 
+    private boolean isNotSupport() {
+        if(Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR1){
+            ViewUtil.showMsgDialog(this, new DialogConfig().setMsg("尊敬的羊羊用户,智能绵羊管家检测到你系统版本过低,已为你推荐了优质通道,是否立即前往?")
+                .setBtnLeftText("知道了").setBtnRightText("前往").setBtnRightOnClickListener(view -> Jump2View.getInstance().goWeb(this, "http://shop.17xmy.com/mobile/category.php?id=144")));
+            return true;
+        }
+        return false;
+    }
+
     private void loadAdvertising() {
         if (advertising.isImage()) {
             Glide.with(activity).load(advertising.getDisplay_src()).into(splash_bg);
@@ -385,6 +389,9 @@ public class SplashAct extends BaseActivity implements EasyPermissions.Permissio
 
     @OnClick({R.id.btn_join, R.id.splash_skip, R.id.splash_know_ad_tv, R.id.splash_bg, R.id.splash_video_view, R.id.splash_click_view})
     public void onViewClicked(View view) {
+        if(isNotSupport()){
+            return;
+        }
         switch (view.getId()) {
             case R.id.btn_join:
             case R.id.splash_skip:

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

@@ -223,7 +223,7 @@ public class FgtAskGetMoneyRank extends BaseFragment {
                         ".根据当月已赚赏金(定向货币除外)和邀请人数进行排行\n" +
                         ".每个月前5名可获取排行奖励。\n" +
                         ".每个月月底最后一天24:00可公布结果,获奖的用户需通过“小绵羊领头羊”公众号发送获奖截图证明及收货信息,核对信息真实后,会第一时间发放!\n" +
-                        ".本活动最终解释权归成都橙风有量科技有限公司所有!")
+                        ".本活动最终解释权归成都聚享天天科技有限公司所有!")
                 .setMsgGravity(Gravity.START)
                 .setTheme(DialogConfig.THEME_PURPLE)
                 .setBtnLeftText("我知道了"));

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

@@ -3,14 +3,17 @@ package com.sheep.gamegroup.view.fragment;
 import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.v7.widget.RecyclerView;
+import android.view.View;
 
 import com.sheep.gamegroup.event.BigEvent;
 import com.sheep.gamegroup.model.api.ApiService;
 import com.sheep.gamegroup.model.entity.BaseMessage;
 import com.sheep.gamegroup.model.entity.GiftBagApp;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.view.adapter.WelfareAdapter;
 import com.sheep.gamegroup.view.adapter.GiftCenterAdapter;
+import com.sheep.jiuyan.samllsheep.R;
 
 import org.greenrobot.eventbus.EventBus;
 import org.greenrobot.eventbus.Subscribe;
@@ -25,6 +28,19 @@ import rx.functions.Action1;
  * realicing@sina.com
  */
 public class FgtGiftCenter extends BaseListFragment2<GiftBagApp> implements Action1<Integer> {
+
+    @Override
+    public int getLayoutId() {
+        return R.layout.fgt_download_welfare_list;
+    }
+
+    @Override
+    public void initView() {
+        super.initView();
+//        wc_gift_center_title_container = findViewById(R.id.wc_gift_center_title_container);
+        View wc_all_gift = findViewById(R.id.wc_all_gift);
+        wc_all_gift.setOnClickListener(view -> Jump2View.getInstance().goMyWelfare(getActivity()));
+    }
     @Override
     public void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

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

@@ -128,6 +128,10 @@ public class FgtPersonalCenter extends BaseFragment {
     View fgt_pc_item_my_pet_v;
     @BindView(R.id.my_pet_layout)
     View my_pet_layout;
+    @BindView(R.id.fgt_pc_item_my_card_v)
+    View fgt_pc_item_my_card_v;
+    @BindView(R.id.my_card_layout)
+    View my_card_layout;
 
     public UserEntity userEntity;
     private String faqUrl;
@@ -230,6 +234,8 @@ public class FgtPersonalCenter extends BaseFragment {
         initUserModuleItemByACache();
         initUserModuleItem();
         initMyPetState();
+        ViewUtil.setVisibility(my_card_layout, true);
+        ViewUtil.setVisibility(fgt_pc_item_my_card_v, true);
     }
 
     private void initMyPetState() {
@@ -446,7 +452,7 @@ public class FgtPersonalCenter extends BaseFragment {
             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.iv_redpackage, R.id.fgt_person_center_my_focus, R.id.fgt_pc_item_vip_ll,
-            R.id.voucher_layout, R.id.my_pet_layout
+            R.id.voucher_layout, R.id.my_pet_layout, R.id.my_card_layout
     })
     public void onViewClicked(View view) {
         switch (view.getId()) {
@@ -474,6 +480,9 @@ public class FgtPersonalCenter extends BaseFragment {
             case R.id.my_pet_layout://我的宠物
                 CommonUtil.getInstance().initUrlConfigByNet(Config.KEY_MY_PET_URL, url -> Jump2View.getInstance().goWeb(activity, url, "我的宠物"));
                 break;
+            case R.id.my_card_layout://我的卡包
+                CommonUtil.getInstance().initUrlConfigByNet(Config.KEY_MY_CARD_URL, url -> Jump2View.getInstance().goWeb(activity, url, "我的卡包"));
+                break;
             case R.id.fgt_pc_item_vip_ll://VIP
                 Jump2View.getInstance().gotoVip(activity);
                 break;

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

@@ -831,7 +831,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
     //fullHomeList有数据时,要让fullHomeList上下遮盖相邻组件
     private void checkFullHomeList() {
         if (/*SkinUtil.curPlugin == Plugin.skin_new_year && */!fullHomeList.isEmpty()) {
-            LayoutParamsUtil.resetLayoutParams(full_home_list_rv, new Lp(G.DENSITY).setTopMargin(-8).setBottomMargin(-4));
+            LayoutParamsUtil.resetLayoutParams(full_home_list_rv, new Lp(G.DENSITY).setTopMargin(-8).setBottomMargin(0));
             LayoutParamsUtil.resetLayoutParams(home_notice_ll, new Lp().setTopMargin(0));
         } else {
             LayoutParamsUtil.resetLayoutParams(full_home_list_rv, new Lp().setTopMargin(0).setBottomMargin(0));
@@ -1505,8 +1505,8 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
 
         if (CommonUtil.getInstance().addNewTask(activity, userEntity) && homeListList != null) {
             HomeListEntity homeListEntityNewTask = new HomeListEntity();
-            homeListEntityNewTask.setTitle(getString(R.string.fresh_task));
-            homeListEntityNewTask.setDesc(getString(R.string.fresh_task));
+            homeListEntityNewTask.setTitle(SheepApp.getInstance().getString(R.string.fresh_task));
+            homeListEntityNewTask.setDesc(SheepApp.getInstance().getString(R.string.fresh_task));
             homeListEntityNewTask.setJump("-1");
             homeListEntityNewTask.setIcon(ViewUtil.getNetImgByName((isNewYear ? "ic_new_year_" : "") + "homepage_xinshourw"));
             homeListEntitys.add(0, homeListEntityNewTask);

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

@@ -47,6 +47,8 @@ public class Config {
     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";
+    //我的卡包地址 key
+    public static final String KEY_MY_CARD_URL = "my_card_url";
 
     //微信支付app_id
     public static final String WX_PAY_APP_ID = "wx427e8e74e8dd27a6";

+ 27 - 4
app/src/main/java/com/sheep/jiuyan/samllsheep/SheepApp.java

@@ -3,6 +3,7 @@ package com.sheep.jiuyan.samllsheep;
 import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.StrictMode;
 import android.support.multidex.MultiDex;
@@ -71,6 +72,7 @@ import java.lang.ref.WeakReference;
 import cn.jpush.android.api.JPushInterface;
 import ren.yale.android.cachewebviewlib.WebViewCacheInterceptor;
 import ren.yale.android.cachewebviewlib.WebViewCacheInterceptorInst;
+import ren.yale.android.cachewebviewlib.config.CacheExtensionConfig;
 import tv.danmaku.ijk.media.exo2.Exo2PlayerManager;
 
 /**
@@ -169,10 +171,16 @@ public class SheepApp extends MultiDexApplication {
         super.onCreate();
         if (AppUtil.isMainProcess(this)) {
             mSheepApp = this;
+            boolean isNotSupport = Build.VERSION.SDK_INT <= Build.VERSION_CODES.JELLY_BEAN_MR1;
             ContextHolder.setContext(this);
             connectAddress = ConnectAddress.sheep.getDefaultConnectAddress();
-            registerActivityLifecycleCallbacks(activityLifecycleCallbacks);
+            if(!isNotSupport) {
+                registerActivityLifecycleCallbacks(activityLifecycleCallbacks);
+            }
             initNet();
+            if(isNotSupport){
+                return;
+            }
             initUtils();
             ChannelContent.getInstance().initChannelContent(this);
             refWatcher = LeakCanary.install(this);
@@ -277,7 +285,20 @@ public class SheepApp extends MultiDexApplication {
 
 //        RemitStoreOnSQLite.setRemitToDBDelayMillis(3000);
         //webView 缓存优化初始化 https://github.com/yale8848/CacheWebView
-        WebViewCacheInterceptorInst.getInstance().init(new WebViewCacheInterceptor.Builder(this).setDebug(BuildConfig.DEBUG).setCacheSize(Long.MAX_VALUE));
+        //删除以下缓存后缀
+        CacheExtensionConfig extension = new CacheExtensionConfig();
+        extension.removeExtension("html");
+        extension.removeExtension("htm");
+        extension.removeExtension("js");
+        extension.removeExtension("ico");
+        extension.removeExtension("css");
+        extension.removeExtension("xml");
+        extension.removeExtension("swf");
+        extension.removeExtension("txt");
+        extension.removeExtension("text");
+        extension.removeExtension("conf");
+        extension.removeExtension("webp");
+        WebViewCacheInterceptorInst.getInstance().init(new WebViewCacheInterceptor.Builder(this).setCacheExtensionConfig(extension).setDebug(BuildConfig.DEBUG).setCacheSize(Long.MAX_VALUE));
         //GSYVideoPlayer https://github.com/CarGuo/GSYVideoPlayer
         PlayerFactory.setPlayManager(Exo2PlayerManager.class);//EXO模式
 //        PlayerFactory.setPlayManager(SystemPlayerManager.class);//系统模式
@@ -485,8 +506,10 @@ public class SheepApp extends MultiDexApplication {
         public void onActivityResumed(Activity activity) {
             if (activityRef != null) activityRef.clear();
             activityRef = new WeakReference<>(activity);
-            if (getCurrentActivity() != null && !(getCurrentActivity() instanceof SplashAct)) { // 应用回到前台
-                CommonUtil.getInstance().checkCopyText();
+            if (mActivityCount == 1) { // 应用回到前台
+                if (getCurrentActivity() != null && !(getCurrentActivity() instanceof SplashAct)) { // 当前activity存在
+                    CommonUtil.getInstance().checkCopyText();
+                }
             }
         }
 

+ 19 - 9
app/src/main/res/layout/dialog_parent_update.xml

@@ -16,18 +16,28 @@
             android:adjustViewBounds="true"
             android:fitsSystemWindows="true"
             android:src="@mipmap/bg_upgrade_app" />
-
-        <TextView
-            android:id="@+id/dialog_title"
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_alignTop="@id/dialog_bg_iv"
-            android:layout_marginStart="40dp"
+            android:orientation="horizontal"
+            android:gravity="end"
             android:layout_marginTop="50dp"
-            android:gravity="center"
-            android:text="发现新版本"
-            android:textColor="@android:color/white"
-            android:textSize="26sp" />
+            android:layout_alignTop="@id/dialog_bg_iv"
+            android:layout_alignParentEnd="true"
+            android:weightSum="20">
+
+            <TextView
+                android:id="@+id/dialog_title"
+                android:layout_width="0dp"
+                android:layout_weight="13"
+                android:layout_height="wrap_content"
+                android:paddingStart="5dp"
+                android:paddingEnd="5dp"
+                android:singleLine="true"
+                android:text="发现新版本"
+                android:textColor="@android:color/white"
+                android:textSize="26sp" />
+        </LinearLayout>
 
         <TextView
             android:id="@+id/dialog_msg"

+ 20 - 0
app/src/main/res/layout/fgt_personalcenter_item_center_one.xml

@@ -42,6 +42,26 @@
     </LinearLayout>
 
     <View
+        android:id="@+id/fgt_pc_item_my_card_v"
+        style="@style/style_item_line_new"
+        android:visibility="gone" />
+    <LinearLayout
+        android:id="@+id/my_card_layout"
+        style="@style/style_item_container">
+
+        <ImageView
+            style="@style/style_item_img"
+            android:src="@mipmap/ic_my_pet" />
+
+        <TextView
+            style="@style/style_item_label"
+            android:text="我的卡包" />
+
+        <TextView style="@style/style_item_end_next" />
+
+    </LinearLayout>
+
+    <View
         android:id="@+id/fgt_pc_item_vip_v"
         style="@style/style_item_line_new"
         android:visibility="gone" />

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

@@ -24,7 +24,7 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_marginStart="2dp"
-                android:layout_marginEnd="15dp"/>
+                android:layout_marginEnd="2dp"/>
 
             <android.support.v7.widget.RecyclerView
                 android:id="@+id/play_game_act"

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

@@ -42,9 +42,8 @@
         android:layout_width="match_parent"
         android:layout_height="30dp"
         android:layout_below="@id/home_search_top"
-        android:layout_marginStart="27dp"
+        android:layout_marginStart="@dimen/content_padding"
         android:layout_marginTop="7dp"
-        android:layout_marginEnd="22dp"
         android:layout_marginBottom="7dp"
         android:layout_toStartOf="@id/home_search_msg_iv"
         android:background="@drawable/shape_main_search_bar_radius"

Разлика између датотеке није приказан због своје велике величине
+ 3 - 3
app/src/main/res/values/strings.xml


+ 1 - 1
gradle.properties

@@ -20,7 +20,7 @@
 VERSION_NAME=3.4.11
 VERSION_CODE=3004011
 ANDROID_COMPILE_SDK_VERSION=28
-ANDROID_MIN_SDK_VERSION=18
+ANDROID_MIN_SDK_VERSION=17
 ANDORID_TARGET_SDK_VERSION=28
 
 POM_DESCRIPTION=Android Library for cropping images