Pārlūkot izejas kodu

article list rewrite to h5

billyyoyo 5 gadi atpakaļ
vecāks
revīzija
2e4833ed3b

+ 11 - 2
app/src/main/java/com/sheep/gamegroup/module/find/activity/ActFind.java

@@ -1,11 +1,15 @@
 package com.sheep.gamegroup.module.find.activity;
 
 import android.support.v4.app.Fragment;
+import android.text.TextUtils;
 
 import com.sheep.gamegroup.absBase.BaseContainerActivity;
 import com.sheep.gamegroup.model.entity.ArticleTag;
+import com.sheep.gamegroup.model.entity.WebParams;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.fragment.BaseListFragment5;
 import com.sheep.gamegroup.view.fragment.FgtFindChild;
+import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.utils.TitleBarUtils;
 
@@ -33,14 +37,19 @@ public class ActFind extends BaseContainerActivity {
     protected Fragment initFragment() {
         int forWhat = getIntent().getIntExtra("for_what", 0);
 //        if (forWhat == FOR_GAME) {
+        String forTitle = getIntent().getStringExtra("for_title");
         int forType = getIntent().getIntExtra("for_type", 0);
         int forSubtype = getIntent().getIntExtra("for_subtype", 0);
         TitleBarUtils.getInstance()
                 .setShowOrHide(this, true)
                 .setTitle(this, forSubtype == 1 ? "游戏资讯" : "活动中心")
                 .setTitleFinish(this);
-        FgtFindChild fgt = FgtFindChild.newInstance(new ArticleTag(-forType, forSubtype));
-        fgt.setRefreshOnType(BaseListFragment5.REFRESH_ON_CREATE);
+//        FgtFindChild fgt = FgtFindChild.newInstance(new ArticleTag(-forType, forSubtype));
+        Fragment fgt = ViewUtil.newWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_ARTICLE_LIST,
+                "title", TextUtils.isEmpty(forTitle) ? (forSubtype == 1 ? "游戏资讯" : "活动中心") : forTitle,
+                "type", -forType,
+                "subtype", forSubtype)).hideProgress());
+//        fgt.setRefreshOnType(BaseListFragment5.REFRESH_ON_CREATE);
         return fgt;
 //        } else {
 //            return new FgtFind2();

+ 10 - 21
app/src/main/java/com/sheep/gamegroup/module/game/fragment/FgtGameCenter.java

@@ -51,7 +51,7 @@ public class FgtGameCenter extends BaseFragment {
 
     public static WeakReference<TabLayout> gameRef;
 
-    private Fragment gameMallFgt, gameCenterFgt, welfareCenterFgt;
+    private BaseFragment gameMallFgt, gameCenterFgt, welfareCenterFgt, articleListFgt;
 
     @BindView(R.id.indicator)
     TabLayout indicator;
@@ -102,25 +102,13 @@ public class FgtGameCenter extends BaseFragment {
     private void initView() {
         ViewUtil.setImage(fgt_gc_hb_500_yuan_iv, R.mipmap.bg_hb_500yuan);
         TitleFragmentListAdapter mAdapter = new TitleFragmentListAdapter(getChildFragmentManager());
-        if (EmulatorDetectUtil.isEmulator()) {
-            gameCenterFgt = FgtWeb.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_GAME_HOME)));
-        } else {
-            gameCenterFgt = FgtWebX5.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_GAME_HOME)));
-        }
-        if (EmulatorDetectUtil.isEmulator()) {
-            welfareCenterFgt = FgtWeb.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_WELFARE_HOME)));
-        } else {
-            welfareCenterFgt = FgtWebX5.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_WELFARE_HOME)));
-        }
-
-        if (EmulatorDetectUtil.isEmulator()) {
-            gameMallFgt = FgtWeb.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_GAME_SHOP_HOME)));
-        } else {
-            gameMallFgt = FgtWebX5.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_GAME_SHOP_HOME)));
-        }
+        gameCenterFgt = ViewUtil.newWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_GAME_HOME)).hideProgress());
+        welfareCenterFgt = ViewUtil.newWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_WELFARE_HOME)).hideProgress());
+        articleListFgt = ViewUtil.newWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_ARTICLE_LIST, "type", -3, "subtype", 0)).hideProgress());
+        gameMallFgt = ViewUtil.newWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_GAME_SHOP_HOME)).hideProgress());
         mAdapter.add(gameCenterFgt, "玩转游戏");
         mAdapter.add(welfareCenterFgt, "福利中心");
-        mAdapter.add(FgtFindChild.newInstance(new ArticleTag(-3, 0)), "游戏资讯");
+        mAdapter.add(articleListFgt, "游戏资讯");
         mAdapter.add(gameMallFgt, "游戏商城");
         pager.setAdapter(mAdapter);
         indicator.setupWithViewPager(pager);
@@ -149,15 +137,16 @@ public class FgtGameCenter extends BaseFragment {
         if (pager == null) return;
         switch (pager.getCurrentItem()) {
             case 0:
-                if (gameCenterFgt != null) ((BaseFragment) gameCenterFgt).initDataOnVisibleToUser();
+                if (gameCenterFgt != null) gameCenterFgt.initDataOnVisibleToUser();
                 break;
             case 1:
-                if (welfareCenterFgt != null) ((BaseFragment) welfareCenterFgt).initDataOnVisibleToUser();
+                if (welfareCenterFgt != null) welfareCenterFgt.initDataOnVisibleToUser();
                 break;
             case 2:
+                if (articleListFgt != null) gameCenterFgt.initDataOnVisibleToUser();
                 break;
             case 3:
-                if (gameMallFgt != null) ((BaseFragment) gameMallFgt).initDataOnVisibleToUser();
+                if (gameMallFgt != null) gameMallFgt.initDataOnVisibleToUser();
                 break;
         }
     }

+ 2 - 5
app/src/main/java/com/sheep/gamegroup/module/home/fragment/FgtWrapper.java

@@ -6,6 +6,7 @@ import android.support.v4.app.FragmentTransaction;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.module.webview.fragment.FgtWeb;
 import com.sheep.gamegroup.module.webview.fragment.FgtWebX5;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
@@ -27,11 +28,7 @@ public class FgtWrapper extends BaseFragment {
 
     public void loadSubFragment() {
         if (subFragment != null) return;
-        if (EmulatorDetectUtil.isEmulator()) {
-            subFragment = FgtWeb.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_SMALL_SHEEP_INVITATION_HOME), "邀请赚钱"));
-        } else {
-            subFragment = FgtWebX5.newInstance(new WebParams(Config.getUrlByPath(Config.PATH_SMALL_SHEEP_INVITATION_HOME), "邀请赚钱"));
-        }
+        subFragment = ViewUtil.newWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_SMALL_SHEEP_INVITATION_HOME), "邀请赚钱"));
         FragmentTransaction transaction = getChildFragmentManager().beginTransaction();
         transaction.add(R.id.fragment_container, subFragment, "fragment_sub").show(subFragment);
         transaction.commitAllowingStateLoss();

+ 3 - 6
app/src/main/java/com/sheep/gamegroup/module/user/activity/ActMyCart.java

@@ -9,6 +9,7 @@ import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.module.webview.fragment.FgtWeb;
 import com.sheep.gamegroup.module.webview.fragment.FgtWebX5;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
 import com.sheep.gamegroup.view.fragment.FgtGameFocusList;
 import com.sheep.gamegroup.view.fragment.FgtUserFocusLogList;
@@ -56,7 +57,7 @@ public class ActMyCart extends BaseActivity {
     public void initData() {
         mAdapter = new TitleFragmentListAdapter(getSupportFragmentManager());
         mAdapter.add(getWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_YY_SHOP_CART) + "?only=1").hideProgress()), "遇见预约");
-        mAdapter.add(getWebFragment(new WebParams(Config.getYFShopUrl(Config.PATH_YF_SHOP_CART) + "&only=1&Authorization="+SpUtils.getToken(this)).hideProgress()), "有范商城");
+        mAdapter.add(getWebFragment(new WebParams(Config.getYFShopUrl(Config.PATH_YF_SHOP_CART) + "&only=1&Authorization=" + SpUtils.getToken(this)).hideProgress()), "有范商城");
         pager.setAdapter(mAdapter);
         indicator.setupWithViewPager(pager);
         pager.setCurrentItem(0);
@@ -66,10 +67,6 @@ public class ActMyCart extends BaseActivity {
 
     private Fragment getWebFragment(WebParams params) {
         params.setShowTitle(false);
-        if (EmulatorDetectUtil.isEmulator()) {
-            return FgtWeb.newInstance(params);
-        } else {
-            return FgtWebX5.newInstance(params);
-        }
+        return ViewUtil.newWebFragment(params);
     }
 }

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

@@ -2628,8 +2628,13 @@ public class Jump2View {
     }
 
     public void goActFind4Game(Activity activity, int type, int subType) {
+        goActFind4Game(activity, type, subType, "");
+    }
+
+    public void goActFind4Game(Activity activity, int type, int subType, String title) {
         Intent in = new Intent(activity, ActFind.class);
         in.putExtra("for_what", 1);
+        in.putExtra("for_title", title);
         in.putExtra("for_type", type);
         in.putExtra("for_subtype", subType);
         activity.startActivity(in);

+ 13 - 0
app/src/main/java/com/sheep/gamegroup/util/ViewUtil.java

@@ -21,6 +21,7 @@ import android.provider.MediaStore;
 import android.support.annotation.LayoutRes;
 import android.support.annotation.Nullable;
 import android.support.annotation.StringRes;
+import android.support.v4.app.Fragment;
 import android.support.v4.app.FragmentActivity;
 import android.support.v7.app.AlertDialog;
 import android.support.v7.widget.GridLayoutManager;
@@ -92,6 +93,8 @@ import com.sheep.gamegroup.model.entity.TaskEty;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.module.skin.util.SkinUtil;
+import com.sheep.gamegroup.module.webview.fragment.FgtWeb;
+import com.sheep.gamegroup.module.webview.fragment.FgtWebX5;
 import com.sheep.gamegroup.module.yf_shop.model.ReceiveCouponsCheckResq;
 import com.sheep.gamegroup.module.yf_shop.model.ReceiveCouponsResp;
 import com.sheep.gamegroup.util.glide.RoundedCornersTransformation;
@@ -116,11 +119,13 @@ import com.sheep.jiuyan.samllsheep.BuildConfig;
 import com.sheep.jiuyan.samllsheep.Config;
 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.ClassFileHelper;
 import com.sheep.jiuyan.samllsheep.utils.G;
 import com.sheep.jiuyan.samllsheep.utils.GlideApp;
 import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
+import com.snail.antifake.jni.EmulatorDetectUtil;
 import com.umeng.socialize.ShareAction;
 import com.umeng.socialize.UMShareListener;
 import com.umeng.socialize.bean.SHARE_MEDIA;
@@ -2818,4 +2823,12 @@ public class ViewUtil {
             e.printStackTrace();
         }
     }
+
+    public static BaseFragment newWebFragment(WebParams webParams) {
+        if (EmulatorDetectUtil.isEmulator()) {
+            return FgtWeb.newInstance(webParams);
+        } else {
+            return FgtWebX5.newInstance(webParams);
+        }
+    }
 }

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

@@ -9,6 +9,7 @@ import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.module.webview.fragment.FgtWeb;
 import com.sheep.gamegroup.module.webview.fragment.FgtWebX5;
 import com.sheep.gamegroup.util.CommonUtil;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
 import com.sheep.gamegroup.view.fragment.FgtGameFocusList;
 import com.sheep.gamegroup.view.fragment.FgtUserFocusLogList;
@@ -55,7 +56,7 @@ public class ActMyFocus extends BaseActivity {
     @Override
     public void initData() {
         mAdapter = new TitleFragmentListAdapter(getSupportFragmentManager());
-        mAdapter.add(getWebFragment(new WebParams(Config.getYFShopUrl(Config.PATH_YF_SHOP_FOCUS) + "&only=1&Authorization="+SpUtils.getToken(this)).hideProgress()), "有范");
+        mAdapter.add(getWebFragment(new WebParams(Config.getYFShopUrl(Config.PATH_YF_SHOP_FOCUS) + "&only=1&Authorization=" + SpUtils.getToken(this)).hideProgress()), "有范");
         mAdapter.add(getWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_YY_SHOP_FOCUS) + "?only=1").hideProgress()), "遇见");
         mAdapter.add(new FgtGameFocusList(), "游戏");
         mAdapter.add(new FgtUserFocusLogList(), "人员");
@@ -68,10 +69,6 @@ public class ActMyFocus extends BaseActivity {
 
     private Fragment getWebFragment(WebParams params) {
         params.setShowTitle(false);
-        if (EmulatorDetectUtil.isEmulator()) {
-            return FgtWeb.newInstance(params);
-        } else {
-            return FgtWebX5.newInstance(params);
-        }
+        return ViewUtil.newWebFragment(params);
     }
 }

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

@@ -87,11 +87,7 @@ public class ActWebShareImage extends BaseUMActivity {
         FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
         Fragment fragment = getSupportFragmentManager().findFragmentByTag("tag");
         if (fragment == null) {
-            if (EmulatorDetectUtil.isEmulator()) {
-                fragment = FgtWeb.newInstance(new WebParams(webUrl, "分享"));
-            } else {
-                fragment = FgtWebX5.newInstance(new WebParams(webUrl, "分享"));
-            }
+            fragment = ViewUtil.newWebFragment(new WebParams(webUrl, "分享"));
             transaction.add(R.id.fragment_container, fragment, "tag");
             transaction.commitAllowingStateLoss();
         } else {

+ 2 - 5
app/src/main/java/com/sheep/gamegroup/view/activity/ActWebX5.java

@@ -11,6 +11,7 @@ import com.sheep.gamegroup.model.api.IWeb;
 import com.sheep.gamegroup.model.entity.WebParams;
 import com.sheep.gamegroup.module.webview.fragment.FgtWeb;
 import com.sheep.gamegroup.module.webview.fragment.FgtWebX5;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.jiuyan.samllsheep.Config;
 import com.sheep.jiuyan.samllsheep.base.BaseFragment;
 import com.sheep.jiuyan.samllsheep.utils.SpUtils;
@@ -39,11 +40,7 @@ public class ActWebX5 extends BaseContainerActivity implements UMShareListener {
     @Override
     protected Fragment initFragment() {
         initWebParams();
-        if (EmulatorDetectUtil.isEmulator()) {
-            fragment = FgtWeb.newInstance(webParams);
-        } else {
-            fragment = FgtWebX5.newInstance(webParams);
-        }
+        fragment = ViewUtil.newWebFragment(webParams);
         return fragment;
     }
 

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

@@ -19,6 +19,7 @@ import com.sheep.gamegroup.module.webview.fragment.FgtWeb;
 import com.sheep.gamegroup.module.webview.fragment.FgtWebX5;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
+import com.sheep.gamegroup.util.ViewUtil;
 import com.sheep.gamegroup.view.adapter.AdpGameTaskOrderList;
 import com.sheep.gamegroup.view.adapter.TitleFragmentListAdapter;
 import com.sheep.gamegroup.view.customview.RefreshLayout;
@@ -81,7 +82,7 @@ public class GameTaskOrderListAct extends BaseActivity {
     public void initData() {
         mAdapter = new TitleFragmentListAdapter(getSupportFragmentManager());
         mAdapter.add(getWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_YY_SHOP_ORDER) + "?only=1").hideProgress()), "遇见预约");
-        mAdapter.add(getWebFragment(new WebParams(Config.getYFShopUrl(Config.PATH_YF_SHOP_ORDER) + "&only=1&Authorization="+ SpUtils.getToken(this)).hideProgress()), "有范订单");
+        mAdapter.add(getWebFragment(new WebParams(Config.getYFShopUrl(Config.PATH_YF_SHOP_ORDER) + "&only=1&Authorization=" + SpUtils.getToken(this)).hideProgress()), "有范订单");
 //        mAdapter.add(new FgtGameTaskOrderList(), "其他订单");
         pager.setAdapter(mAdapter);
         indicator.setupWithViewPager(pager);
@@ -97,10 +98,6 @@ public class GameTaskOrderListAct extends BaseActivity {
 
     private Fragment getWebFragment(WebParams params) {
         params.setShowTitle(false);
-        if (EmulatorDetectUtil.isEmulator()) {
-            return FgtWeb.newInstance(params);
-        } else {
-            return FgtWebX5.newInstance(params);
-        }
+        return ViewUtil.newWebFragment(params);
     }
 }

+ 13 - 16
app/src/main/java/com/sheep/gamegroup/view/fragment/BaseListFragment5.java

@@ -174,18 +174,15 @@ public abstract class BaseListFragment5<T> extends BaseFragment implements IRefr
                     @Override
                     public void onNext(BaseMessage baseMessage) {
                         lastMessage = baseMessage;
-                        pluginLoadData(new Action1() {
-                            @Override
-                            public void call(Object o) {
-                                boolean isNewData = DataUtil.getInstance().isNewData(urlKey);
-                                if (isNewData || !isFirstGetACache()) {
-                                    if (isFirstGetACache())
-                                        ListUtil.removeAll(list, lastCacheList);
-                                    List<T> newList = baseMessage.getDatas(getTClass());
-                                    loadList(newList);
-                                } else {
-                                    notifyDataSetChanged();
-                                }
+                        pluginLoadData((o) -> {
+                            boolean isNewData = DataUtil.getInstance().isNewData(urlKey);
+                            if (isNewData || !isFirstGetACache()) {
+                                if (isFirstGetACache())
+                                    ListUtil.removeAll(list, lastCacheList);
+                                List<T> newList = baseMessage.getDatas(getTClass());
+                                loadList(newList);
+                            } else {
+                                notifyDataSetChanged();
                             }
                         });
                     }
@@ -226,7 +223,7 @@ public abstract class BaseListFragment5<T> extends BaseFragment implements IRefr
         return refreshOnType;
     }
 
-    public void setRefreshOnType(int type){
+    public void setRefreshOnType(int type) {
         refreshOnType = type;
     }
 
@@ -251,7 +248,7 @@ public abstract class BaseListFragment5<T> extends BaseFragment implements IRefr
     }
 
     public void notifyDataSetChanged() {
-        if (view_list == null){
+        if (view_list == null) {
             return;
         }
         if (empty_view == null) {
@@ -270,7 +267,7 @@ public abstract class BaseListFragment5<T> extends BaseFragment implements IRefr
         view_list.getFootView().setVisibility(view_list.getAdapter() != null && view_list.getAdapter().getItemCount() == 0 ? View.GONE : View.VISIBLE);
     }
 
-    protected void combineList(){
+    protected void combineList() {
 
     }
 
@@ -288,7 +285,7 @@ public abstract class BaseListFragment5<T> extends BaseFragment implements IRefr
         }
     }
 
-    public void pluginLoadData(Action1 action){
+    public void pluginLoadData(Action1 action) {
         action.call(null);
     }
 

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

@@ -10,6 +10,7 @@ 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.entity.WebParams;
 import com.sheep.gamegroup.model.util.SheepSubscriber;
 import com.sheep.gamegroup.util.CommonUtil;
 import com.sheep.gamegroup.util.DataUtil;
@@ -17,6 +18,7 @@ import com.sheep.gamegroup.util.Jump2View;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.ViewUtil;
 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.base.BaseFragment;
@@ -60,10 +62,11 @@ public class FgtFind extends BaseFragment {
 
     private void initView() {
         mAdapter = new TitleFragmentListAdapter(getChildFragmentManager());
-        ArticleTag articleTagAll = new ArticleTag();
-        articleTagAll.setId(0);
-        articleTagAll.setName("全部");
-        mAdapter.add(FgtFindChild.newInstance(articleTagAll), articleTagAll.getName());
+//        ArticleTag articleTagAll = new ArticleTag();
+//        articleTagAll.setId(0);
+//        articleTagAll.setName("全部");
+//        mAdapter.add(FgtFindChild.newInstance(articleTagAll), articleTagAll.getName());
+        mAdapter.add(ViewUtil.newWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_ARTICLE_LIST, "type", 0, "subtype", 0)).hideProgress()), "全部");
         //悬浮
         ViewUtil.setImage(add_article_expand, ViewUtil.getNetImgByName("add_article_expand"));
         if (!onlyChooseVideo) {
@@ -167,7 +170,7 @@ public class FgtFind extends BaseFragment {
                             mAdapter.add(FgtArticleVideo.newInstance(findLabel.getId()), findLabel.getName());
                             break;
                         default:
-                            mAdapter.add(FgtFindChild.newInstance(findLabel), findLabel.getName());
+                            mAdapter.add(ViewUtil.newWebFragment(new WebParams(Config.getUrlByPath(Config.PATH_ARTICLE_LIST, "type", findLabel.getId(), "subtype", 0)).hideProgress()), findLabel.getName());
                             break;
                     }
                     count++;

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

@@ -209,14 +209,14 @@ public class FgtFindChild extends BaseListFragment5<Article> {
         @Override
         public int getViewIdByType(int type) {//type来源于 getItemViewType 返回的值
             if (FgtFindChild.this.type < 0) {
-                return R.layout.find_item_game_news;
+                return R.layout.find_item_game_news; //游戏
             } else {
                 if (type == -1 || type == -2) {
-                    return R.layout.find_item_ad;
+                    return R.layout.find_item_ad;   //广告
                 } else if (type == 2 && newsConverter != null) {
-                    return R.layout.find_item_news;
+                    return R.layout.find_item_news;  //横版
                 }
-                return R.layout.find_item;
+                return R.layout.find_item;  //大图
             }
         }
 

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

@@ -101,6 +101,7 @@ public class Config {
     //福利
     public static final String PATH_WELFARE_HOME = STATION_WELFARE + "/welfare-center";
     public static final String PATH_GAME_HOME = STATION_WELFARE + "/game-center";
+    public static final String PATH_ARTICLE_LIST = STATION_WELFARE + "/article-list";
     public static final String PATH_WELFARE_DETAIL = STATION_WELFARE + "/detail";
     public static final String PATH_DISCOUNT_DESC = STATION_WELFARE + "/discount";
     //游戏商城

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

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

+ 0 - 10
app/src/main/res/layout/find_item.xml

@@ -91,16 +91,6 @@
                 app:layout_constraintStart_toEndOf="@+id/find_item_des"
                 app:layout_constraintTop_toTopOf="parent" />
 
-            <!--        <TextView
-                        android:id="@+id/find_item_pf_label"
-                        android:layout_width="match_parent"
-                        android:layout_height="wrap_content"
-                        app:layout_constraintTop_toBottomOf="@+id/find_item_des"
-                        android:layout_marginTop="8dp"
-                        android:text="评分:8.9"
-                        android:textColor="#646464"
-                        android:textSize="14sp" />-->
-
         </android.support.constraint.ConstraintLayout>
 
     </LinearLayout>