title: PDF viewer in fragments?
body: <p>I've made an app and that includes fragments.My PDF viewer works perfectly fine but not in fragments.How can I fix that ? I have asset files and everything.Compiled git hub reference, XML just having trouble with fragments.Thank You</p>
  
  <pre><code> public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          if (getArguments() != null) {
              mParam1 = getArguments().getString(ARG_PARAM1);
              mParam2 = getArguments().getString(ARG_PARAM2);
  
              //pdfView = getView().findViewById(R.id.pdfView);
              //pdfView.fromAsset("tenor-madness.pdf").load();
          }
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
          // Inflate the layout for this fragment
          return inflater.inflate(R.layout.fragment_tab1, container, false);
  
      }
  </code></pre>
  
  <p>XML FİLE</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context="liselimanyak.practice.Tag2"&gt;
  
      &lt;!-- TODO: Update blank fragment layout --&gt;
  
      &lt;com.github.barteksc.pdfviewer.PDFView
          android:id="@+id/pdfView"
          android:layout_width="match_parent"
          android:layout_centerInParent="true"
          android:layout_height="match_parent"/&gt;
  
      &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="tab1"
          android:layout_centerInParent="true"
          android:textSize="30dp"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>