Fix bug
Can not perform this action after onSaveInstanceState com.mogo.module.small.map.SmallMapProvider.showPanel(SmallMapProvider.java:68)
This commit is contained in:
@@ -69,11 +69,11 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
|
||||
if (mSmallMapFragment == null) {
|
||||
Logger.d(TAG, "准备add fragment======");
|
||||
mSmallMapFragment = new SmallMapFragment();
|
||||
mActivity.getSupportFragmentManager().beginTransaction().add(mContainerId, mSmallMapFragment).commit();
|
||||
mActivity.getSupportFragmentManager().beginTransaction().add(mContainerId, mSmallMapFragment).commitAllowingStateLoss();
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "准备show fragment");
|
||||
mActivity.getSupportFragmentManager().beginTransaction().show(mSmallMapFragment).commit();
|
||||
mActivity.getSupportFragmentManager().beginTransaction().show(mSmallMapFragment).commitAllowingStateLoss();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class SmallMapProvider implements IMogoSmallMapProvider, IMogoStatusChang
|
||||
try {
|
||||
if (mSmallMapFragment != null) {
|
||||
Logger.d(TAG, "准备hide fragment");
|
||||
mActivity.getSupportFragmentManager().beginTransaction().hide(mSmallMapFragment).commit();
|
||||
mActivity.getSupportFragmentManager().beginTransaction().hide(mSmallMapFragment).commitAllowingStateLoss();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user