Bladeren bron

首页隐藏,3.3 tab功能

liujiangyao 7 jaren geleden
bovenliggende
commit
edcb683e86

+ 4 - 0
app/src/main/java/com/sheep/gamegroup/view/activity/ActMain.java

@@ -26,6 +26,7 @@ import com.sheep.gamegroup.util.DrawablesHelper;
 import com.sheep.gamegroup.util.ListUtil;
 import com.sheep.gamegroup.util.UMConfigUtils;
 import com.sheep.gamegroup.view.fragment.FgtMainAudit;
+import com.sheep.gamegroup.view.fragment.FgtSmallSheep;
 import com.sheep.jiuyan.samllsheep.R;
 import com.sheep.jiuyan.samllsheep.SheepApp;
 import com.sheep.jiuyan.samllsheep.utils.G;
@@ -150,6 +151,9 @@ public class ActMain extends BaseActivity {
                     lastTab.setActivated(false);
                 if (curTab != null)
                     curTab.setActivated(true);
+                if(lastPosition == MainTab.FgtSmallSheep.ordinal() && position != MainTab.FgtSmallSheep.ordinal()){
+                    ((FgtSmallSheep)MainTab.FgtSmallSheep.getFragment()).onPause();
+                }
                 showFind(position == MainTab.Fgt_Find.ordinal());
                 //更新position
                 lastPosition = position;

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

@@ -758,7 +758,7 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
             public void onScrollChange(NestedScrollView nestedScrollView, int i, int i1, int i2, int i3) {
                 listTitle.getLocationInWindow(locate);
                 if (locate[1] < 0 && titleCardLayout.getVisibility() == View.GONE) {
-                    titleCardLayout.setVisibility(View.VISIBLE);
+//                    titleCardLayout.setVisibility(View.VISIBLE);
                 } else if (locate[1] > 20 && titleCardLayout.getVisibility() == View.VISIBLE) {
                     titleCardLayout.setVisibility(View.GONE);
                 }
@@ -1332,6 +1332,9 @@ public class FgtSmallSheep extends BaseFragment implements SmallSheepContract.Vi
             //停止滚动
             homepageItemNoticeMv.stopFlipping();
         }
+        if(titleCardLayout != null){
+            titleCardLayout.setVisibility(View.GONE);
+        }
     }
 
     private void invite(final List<MoreDataEntity> moreDataEntityList) {