is it possible to open a fragment B from fragment A by tapping on a button in fragment A? Both fragments are part of a main FragmentActivity. How can I handle that?
EDIT:
The Tabs are implemened like that:
ActionBar actionbar = getSupportActionBar();
actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
Tab tab1 = actionbar.newTab().setText("");
Tab tab2 = actionbar.newTab().setText("");
tab1.setTabListener(new MyTabListener<AFragment>(this, "tab1",AFragment.class));
tab2.setTabListener(new MyTabListener<BFragment>(this, "tab2",BFragment.class));
tab1.setIcon(R.drawable.ic_a);
tab2.setIcon(R.drawable.ic_b);
actionbar.addTab(tab1,0,true);
actionbar.addTab(tab2,1,false);
Thank you :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…