This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. create assets folder in src under your app name. | |
2. In this assets folder keep your pdf files e.g. file.pdf. | |
3 now come your activity i.e MainActivity.java | |
4. setListener on any UI component what you want i.e (Button,ImageView,ImageButton); | |
5. In this listener call one user defined method i.e. openPDFFiles("file.pdf"); | |
the openPDFFiles() method have below code:—- | |
private void openPDFFiles(String fileName) //fileName is the pdf file name which is keep in assets folder. ex file.pdf | |
{ |