Add the below comments in build.
gradle (Module app)
compile 'com.github.barteksc:android-pdf-viewer:3.0.0-beta.5'
2. activity.main.xml
Change the lay out into Linear Layout
And add the android:orientation = ”vertical”
Adding Layout in activity.main.xml in the below codes instead of Text View.
<com.github.barteksc.pdfviewer.PDFView
android:id="@+id/pdfView"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
3. create the Asset Folder by Clicking New -> Folder -> Asset Folder
4. Loading the PDF
<com.github.barteksc.pdfviewer.PDFView
android:id="@+id/pdfView"
android:layout_width="match_parent"
android:layout_height="400dp"/>
<user-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
mPDFView = (PDFView) findViewById(R.id.pdfView);
mPDFView .fromAsset ( assetName: "Nelson_Resume.pdf").load();
// <user-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>