防止重复添加
This commit is contained in:
@@ -60,7 +60,9 @@ public class BusProvider implements IMogoOCH {
|
||||
} else {
|
||||
busFragment = new BusFragment();
|
||||
}
|
||||
supportFragmentManager.beginTransaction().add(containerId, busFragment, BusFragment.TAG).commitAllowingStateLoss();
|
||||
if(!busFragment.isAdded()) {
|
||||
supportFragmentManager.beginTransaction().add(containerId, busFragment, BusFragment.TAG).commitAllowingStateLoss();
|
||||
}
|
||||
return;
|
||||
}
|
||||
CallerLogger.INSTANCE.d(TAG, "准备show fragment");
|
||||
|
||||
Reference in New Issue
Block a user