[Solved] error: cannot find symbol method setContentView(int) [duplicate]

[ad_1]

In fragment you inflate the layout not setContentView
the code maybe look like this

        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            View rootView = inflater.inflate(R.layout.fragment1_layout, container, false);

      // Put your fragment code here

        return rootView;
    }

9

[ad_2]

solved error: cannot find symbol method setContentView(int) [duplicate]