title: Android PDF Viewer null object reference error
body: <p>I am using barteksc Android PDF Viewer like many others (<a href="https://github.com/barteksc/AndroidPdfViewer" rel="nofollow noreferrer">https://github.com/barteksc/AndroidPdfViewer</a>).  I keep receiving a null object reference error.  This is the error.  </p>
  
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
                    Process: group6.interactivehandwriting, PID: 24037
                    java.lang.RuntimeException: Unable to start activity ComponentInfo{group6.interactivehandwriting/group6.interactivehandwriting.activities.RoomActivity.RoomActivity}: android.view.InflateException: Binary XML file line #9: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
  </code></pre>
  
  <p>I have checked to make sure I am referencing the views correctly.  The asset I am loading called "sample.pdf" is in my assets.  </p>
  
  <p><strong>* Can you see any reason why I am receiving this error? *</strong></p>
  
  <p>I realize there are multiple post about this library, however every instance seems to be unique so I decided to go ahead and ask.</p>
  
  <p>RoomActivity.java</p>
  
  <pre><code>package group6.interactivehandwriting.activities.RoomActivity;
  
  import android.content.res.AssetManager;
  import android.os.Bundle;
  import android.app.Activity;
  import android.util.Log;
  import android.view.View;
  
  import com.github.barteksc.pdfviewer.PDFView;
  import com.github.barteksc.pdfviewer.listener.OnLoadCompleteListener;
  import com.github.barteksc.pdfviewer.listener.OnPageChangeListener;
  import com.github.barteksc.pdfviewer.scroll.DefaultScrollHandle;
  
  import group6.interactivehandwriting.R;
  import group6.interactivehandwriting.activities.RoomActivity.views.DocumentView;
  import group6.interactivehandwriting.activities.RoomActivity.views.RoomView;
  
  public class RoomActivity extends Activity implements OnPageChangeListener, OnLoadCompleteListener {
      RoomView roomView;
      DocumentView docView;
      PDFView pView;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          Log.d("Android: ", "Setting content view to an instance of RoomView in: " + this.getClass().getName());
          setContentView(R.layout.activity_draw);
  
          System.out.println("Attempting to set ImageView..");
          pView = (PDFView) findViewById(R.id.pdfView);
          pView.fromAsset("sample.pdf").defaultPage(0)
                  .enableSwipe(true).swipeHorizontal(false).
                  onPageChange(this).enableAnnotationRendering(true).onLoad(this).scrollHandle(new DefaultScrollHandle(this)).load();
  
  
      }
  
      @Override
      public void onPageChanged(int page, int pageCount) {
          setTitle(String.format("%s %s / %s", "Sample", page + 1, pageCount));
      }
  
      @Override
      public void loadComplete(int nbPages) {
      }
  }
  </code></pre>
  
  <p>AndroidManifest.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="group6.interactivehandwriting"&gt;
  
      &lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/&gt;
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/ic_launcher"
          android:label="@string/app_name"
          android:roundIcon="@mipmap/ic_launcher_round"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"&gt;
          &lt;activity
              android:name=".activities.RoomActivity.RoomActivity"
              android:label="@string/title_activity_menu"
              android:theme="@style/AppTheme.NoActionBar"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>activity_draw.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".activities.RoomActivity.RoomActivity"&gt;
  
      &lt;view
          android:id="@+id/room_view"
          id="@+id/view"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          app:layout_constraintBottom_toBottomOf="parent"
          app:layout_constraintEnd_toEndOf="parent"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent" /&gt;
  
      &lt;com.github.barteksc.pdfviewer.PDFView
          android:id="@+id/pdfView"
          android:layout_width="match_parent"
          android:layout_height="match_parent"/&gt;
  
      &lt;TextView
          android:id="@+id/textView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_marginStart="8dp"
          android:layout_marginTop="8dp"
          android:text="@string/room"
          app:layout_constraintStart_toStartOf="parent"
          app:layout_constraintTop_toTopOf="parent" /&gt;
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>
  
  <p>Dependencies:</p>
  
  <pre><code>compile 'com.github.barteksc:android-pdf-viewer:2.8.2'
  
  compile 'org.apache.commons:commons-collections4:4.1'
  </code></pre>