7 Fragment可以实现动态加载,下面是实现动态加载的过程,请补全代码?private void replaceFragment(int layout,Fragment fragment){ FragmentManager manager=getSupportFragmentManager(); FragmentTransaction fragmentTransaction=manager.beginTransaction(); fragmentTransaction.replace(layout,fragment); fragmentTransaction.addToBackStack(null); ( ? ); } A: fragmentTransaction.getFragmentById() B: fragmentTransaction.getAcitivity() C: fragmentTransaction.commitFragment() D: fragmentTransaction.commit()
7 Fragment可以实现动态加载,下面是实现动态加载的过程,请补全代码?private void replaceFragment(int layout,Fragment fragment){ FragmentManager manager=getSupportFragmentManager(); FragmentTransaction fragmentTransaction=manager.beginTransaction(); fragmentTransaction.replace(layout,fragment); fragmentTransaction.addToBackStack(null); ( ? ); } A: fragmentTransaction.getFragmentById() B: fragmentTransaction.getAcitivity() C: fragmentTransaction.commitFragment() D: fragmentTransaction.commit()
1