Answer the question
In order to leave comments, you need to log in
How to save the entire stack of fragments within an activity?
There is MainActivity, where a fragment of the initial state of the application is created in onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
fragmentManager.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
getFragmentManager().beginTransaction()
.replace(R.id.contentMain, new StatisticsFragment())
.commit();
}
class TasksFragment{
mCallbacks = (ICallbacks)getFragmentManager().findFragmentById(R.id.contentMain);
}
Answer the question
In order to leave comments, you need to log in
It clearly tells you that the fragment that you added does not implement the interface you need.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question