This code is from https://developers.facebook.com/docs/android/login-with-facebook/v2.1. Code:
@Override
public View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.main, container, false);
return view;
}
Basically this code is to create the ui layout for the fragment button that will be injected into the main activity layout. My question is for the parameter attachtoroot, why is it false in this case? I know the onCreateView method sets up and returns a view containing the fragment's user interface and gives this view to the hosting activity so the host activity can install the view in its view hierarchy(notes I have). Going off the answer I got here Clarification about layout inflater -attach to root?, attachtoroot being true will attach the fragment layout to its parent layout, in this case main activity layout. Can anyone clarify why its false?