Загрузка страницы

Android Studio - How To Open PDF File | PDF Viewer (2018)

This Tutorial shows how to open pdf file using external library called PDFViewer(PDF Viewer).
-----------------------------
Step 1 is to include this external library inside your build.gradle file:

implementation 'com.github.barteksc:android-pdf-viewer:2.8.2'
-----------------------------
After that we want to put PDFViewer in our layout. Here it is:

(angle bracker)com.github.barteksc.pdfviewer.PDFView
android:id="@+id/pdfView"
android:layout_width="match_parent"
android:layout_height="400dp" / - put angle closing bracket here
-----------------------------
After that we need to create "assets" folder and put our PDF File inside that folder. When you are finished with that just declare and initialize PDFViewer.

Last thing we need to do is to call PDFVIewer load() function. In this tutorial we are loading our file from asset so call: fromAsset("name of your file").load().
-----------------------------
Subscribe to Programming Hustle if you want more tutorials like this.

Видео Android Studio - How To Open PDF File | PDF Viewer (2018) канала Programming Hustle
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
3 сентября 2018 г. 21:55:04
00:03:40
Яндекс.Метрика