Android Studio How To Create PDF Book Application

In this Android Studio article i want to show you How To Create PDF Book Application. so  for good explanation you can watch the video for this article.

 

Also check my Android Development Courses

 

Now lets get started !

 

1: First of all create a new project in your Android Studio, and choose Empty Activity also iam using API 20 for this project.

2: OK after creating our project in Android Studio, you need to open build.gradle(Module:App) file and add this library in the dependency section. because this is the library that we are going to use for reading our pdf file.

 

 

 

 

After adding your build.gradle(Module:App) file will look like this.

 

 

 

 

So now open your main_activity.xml and add this code, basically in here we are going to create a PDFView, and we have used the width and height as match_parent.

 

 

 

 

After adding of the PDFView, our activity_main.xml file looks like this, you can see that we are using ConstraintLayout for this purpose.

 

 

 

 

Now open your MainActivity.java first create the object of PDFView and after that add this code. in this code first we have created the object of our PDFView class, and after that we have found the id of PDFView in the xml file, also you can see that we have added some features for the PDFViewer.

 

 

 

 

After adding the code will MainActivity.java look like this

 

 

 

 

So now run the complete project and this will be the result

Android Studio How To Create PDF Book Application
Android Studio How To Create PDF Book Application

 

 

 

 

Watch the complete video tutorial for this article 

 

Subscribe and Get Free Video Courses & Articles in your Email

 

Share via
Copy link
Powered by Social Snap
×