[Bus/TaxiDriver v2.5.1]OCH: fragment commit优化
This commit is contained in:
@@ -51,17 +51,17 @@ public class OchBusProvider implements IMogoOCH {
|
||||
if (busFragment == null) {
|
||||
Logger.d(TAG, "准备add fragment======");
|
||||
busFragment = new OchBusFragment();
|
||||
activity.getSupportFragmentManager().beginTransaction().add(containerId, busFragment).commit();
|
||||
activity.getSupportFragmentManager().beginTransaction().add(containerId, busFragment).commitAllowingStateLoss();
|
||||
return;
|
||||
}
|
||||
Logger.d(TAG, "准备show fragment");
|
||||
activity.getSupportFragmentManager().beginTransaction().show(busFragment).commit();
|
||||
activity.getSupportFragmentManager().beginTransaction().show(busFragment).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
private void hideFragment() {
|
||||
if (busFragment != null) {
|
||||
Logger.d(TAG, "准备hide fragment");
|
||||
activity.getSupportFragmentManager().beginTransaction().hide(busFragment).commit();
|
||||
activity.getSupportFragmentManager().beginTransaction().hide(busFragment).commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user