I am trying to call a library in a fragment but dont know how to set it in a fragment I have done it in the main activity but I am getting an error in setting the setContentVie
setContentView() is for Activities, for Fragments you have to return the inflated layout on the onCreateView() method like this:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.article_view, container, false);
}
I hope it helps.