Answer the question
In order to leave comments, you need to log in
Why is onSaveInstanceState not called when the fragment is changed?
This is how I change the snippet
ProjectPage frag1;//ссылка на фрагмент
FragmentTransaction fTrans;//ссылка на транзакции
frag1 = new ProjectPage();//создание объекта фрагмента
fTrans = getActivity().getSupportFragmentManager().beginTransaction();
Bundle args = new Bundle();
save_state_bundle(args);
frag1.setArguments(args);
fTrans.replace(R.id.main_layout, frag1);
fTrans.addToBackStack(null);
fTrans.commit();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question