Android + ListFragment with a custom view hierarchy

后端 未结 5 847
名媛妹妹
名媛妹妹 2021-02-12 22:28

I\'m attempting to customize the fragment layout by returning my own view hierarchy from onCreateView(LayoutInflater, ViewGroup, Bundle). This inflates my custom v

5条回答
  •  情话喂你
    2021-02-12 22:55

    I think you'd better

     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle  savedInstanceState) {
     View root = inflater.inflate(R.layout.main, container, false);
     return root;
     }
    

提交回复
热议问题