I wonder what is container parameter in onCreateView()
, cause when i inflate view to that container it make me wonder what viewGroup is this,is it a viewGroup from the activity that we will add a fragment to ? if it is true then why we need to attach it in inflate method cause i think we will add this fragment to the viewgroup of activity in activity's xml anyway.
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_top,container,true);
return view;
}