my problem is that i am trying to start a fragment from an activity that extends from ListActivity
i tryed this solution :
FragmentManager fragmentManager = getSupportFragmentManager();
fragmentManager.popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
fragmentManager.beginTransaction()
.replace(R.id.frame_container, fragment, TAG).commit();
fragmentManager.beginTransaction()
.replace(R.id.frame_container, fragment, TAG)
.addToBackStack(TAG)
.commit();
the problem is: getSupportFragmentManager()
is unknow because my activity doesn't extends from FragmentActivity
.
i don't want to extend from FragmentActivity
is there any solution to do it?