How to initialize Container(ViewGroup)?
问题 Automatically, in OnCreateView, there's: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { I want to initialize my variable as in the same way like OnCreateView in AsyncTask. I was able to initialize these variable : LayoutInflater inflater; ViewGroup container; inflater = (LayoutInflater) ctx .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View rootView = inflater.inflate(R.layout.fragment_pager_list, container, false); However,