|
|
@@ -28,6 +28,7 @@ import com.sheep.gamegroup.model.entity.Container;
|
|
|
import com.sheep.gamegroup.model.entity.Lp;
|
|
|
import com.sheep.gamegroup.model.entity.UserEntity;
|
|
|
import com.sheep.gamegroup.model.util.ShowRedDot;
|
|
|
+import com.sheep.gamegroup.module.home.fragment.FgtWrapper;
|
|
|
import com.sheep.gamegroup.util.ActionUtil;
|
|
|
import com.sheep.gamegroup.util.ChannelContent;
|
|
|
import com.sheep.gamegroup.util.CommonUtil;
|
|
|
@@ -249,15 +250,22 @@ public class ActMain extends BaseActYmPermissionCheck {
|
|
|
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
|
|
|
Fragment cFragment = getSupportFragmentManager().findFragmentByTag("fragment_" + position);
|
|
|
Fragment lFragment = getSupportFragmentManager().findFragmentByTag("fragment_" + lastPosition);
|
|
|
- if (lFragment != null)
|
|
|
+ if (lFragment != null) {
|
|
|
transaction.hide(lFragment);
|
|
|
- if (cFragment != null)
|
|
|
+ }
|
|
|
+ if (cFragment != null) {
|
|
|
transaction.show(cFragment);
|
|
|
+ }
|
|
|
transaction.commitAllowingStateLoss();
|
|
|
- if (lFragment != null)
|
|
|
+ if (lFragment != null) {
|
|
|
lFragment.setUserVisibleHint(false);
|
|
|
- if (cFragment != null)
|
|
|
+ }
|
|
|
+ if (cFragment != null) {
|
|
|
cFragment.setUserVisibleHint(true);
|
|
|
+ }
|
|
|
+ if (cFragment instanceof FgtWrapper) {
|
|
|
+ ((FgtWrapper) cFragment).loadSubFragment();
|
|
|
+ }
|
|
|
}
|
|
|
changeVisible(lastPosition, position);
|
|
|
lastPosition = position;
|