entering in code like this:
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
comes up with this error \"androi
Ok...Just make a method for fragment and call this Like:
void addfragment(Fragment fragment, boolean addBacktoStack, int transition) {
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.simple_fragment, fragment);
ft.setTransition(transition);
if (addBacktoStack)
ft.addToBackStack(null);
ft.commit();
}
Now Just call Your Fragment:
addfragment(new DescriptionFragment(this),true, FragmentTransaction.TRANSIT_FRAGMENT_OPEN);