FragmentManager fragmentmanger = getSupportFragmentManager(); FragmentTransaction fragmenttransaction = fragmentmanager.begintransaction();//这一步不进行也可以查找 Fragment fragment = fragmentManager.findFragmentById(R.id.fragment); if(fragment!==null){ fragmentTransaction.remove(fragment).commit; } //查找是删除的基础
标签:fragmentTransaction,fragment,查找,移除,null,id From: https://www.cnblogs.com/kun1790051360/p/17294404.html