/**
* 显示实例
* @param activity 或者 Context
*/
public static void showInstance(FragmentActivity activity) {
Bundle bundle = new Bundle();
XXXXXDialog dialog = new XXXXXDialog();
dialog .setArguments(bundle);
FragmentManager supportFragmentManager = activity.getSupportFragmentManager();
FragmentTransaction fragmentTransaction = supportFragmentManager.beginTransaction();
fragmentTransaction.add(dialog ,"TagXXXX");
fragmentTransaction.commitAllowingStateLoss();
//show里面是commit() ---- 换成上面的 commitAllowingStateLoss 就行
//dialog .show(activity.getSupportFragmentManager(), "TagXXXX");
}
07-31
963
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
04-15
1033
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
01-11
1254
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-05
2423
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-06
727
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)