How to implement OnFragmentInteractionListener

后端 未结 12 2523
花落未央
花落未央 2020-11-22 06:25

I have a wizard generated app with navigation drawer in android studio 0.8.2

I have created a fragment and added it with newInstance() and I get this error:

12条回答
  •  醉酒成梦
    2020-11-22 07:19

    Just go to your fragment Activity and remove all method.....instead on on createview method.

    your fragment has only on method oncreateview that's it.

    //only this method implement other method delete

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

    and make sure your layout it is demo for u.

提交回复
热议问题