中国大学MOOC: 下面代码用于打开一个SummaryFragment对象,请补充完整:SummaryFragment f = new SummaryFragment();FragmentManager manger = getSupportFragmentManager();manger.beginTransaction().replace(R.id.layoutContent, ).commit();
中国大学MOOC: 下面代码用于打开一个SummaryFragment对象,请补充完整:SummaryFragment f = new SummaryFragment();FragmentManager manger = getSupportFragmentManager();manger.beginTransaction().replace(R.id.layoutContent, ).commit();
5 TitleFragment中访问ContentFragment的方法,请补全下列代码?ContentFragment mContentFragment=(ContentFragment)getActivity(). ( ? ).findFragmentById(R.id.fragment_content); mContentFragment.setData(strTitle,strContent); A: getSupportManager() B: getManager() C: getFrament() D: getSupportFragmentManager()
5 TitleFragment中访问ContentFragment的方法,请补全下列代码?ContentFragment mContentFragment=(ContentFragment)getActivity(). ( ? ).findFragmentById(R.id.fragment_content); mContentFragment.setData(strTitle,strContent); A: getSupportManager() B: getManager() C: getFrament() D: getSupportFragmentManager()
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()