Answer the question
In order to leave comments, you need to log in
OnCreateOptionsMenu not called on fragment?
Good afternoon. There is a fragment that displays in itself on one screen:
1) a fragment with a list of a tree
2) a fragment with detailed information about an element
From this screen, you can fail to another and when you go back, so that the fragment with a list of a tree and information does not recreate the following code:
@Override
public void onDestroyView() {
if (_rootView.getParent() != null) {
((ViewGroup)_rootView.getParent()).removeView(_rootView);
}
super.onDestroyView();
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
if (_rootView == null){
// Inflate the layout for this fragment
_rootView = inflater.inflate(R.layout.fragment_goods_tree_contener, container,false);
return _rootView;
}
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