当我调用另一个片段时,不删除第一个片段的ViewPager。我已经花了2天时间但却没有得到它。如果有人帮助我,我将非常感激。
FragmentManager fragmentManager = getFragmentManager();
Fragment fragment=new SecondPage(urlToSecondPageStory,storyCategoryContainer.get(position));
Bundle bundle = new Bundle();
bundle.putString("imageurl",imageUrl);
fragment.setArguments(bundle);
FragmentTransaction transaction=fragmentManager.beginTransaction();
transaction.replace(android.R.id.content,fragment);
// transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);
//transaction.addToBackStack(null);
transaction.commit();