Facebook Twitter Instagram
    DeepCrazyWorld
    Facebook Twitter Instagram Pinterest YouTube
    • FLUTTER
      • FLUTTER APP
        • QRCode
        • Quiz App
        • Chat GPT
        • PDF App
        • News App
        • Fitness App
        • Weather App
        • BMI Calculator
        • GAME APP
        • Ecommerce App
        • wallpaper App
        • Finance app
        • Chat App
        • Wallet App
        • Taxi App
        • Quran app
        • Music player app
      • FLUTTER UI
        • Splash Screen
        • Onboarding Screen
        • Login Screen
        • Card Design
        • Drawer
    • PROJECT
      • Android Projects
      • College Projects
      • FLUTTER APP
      • Project Ideas
      • PHP Projects
      • Python Projects
    • SOURCE CODE
    • ANDROID
      • ANDROID APP
      • GAME APP
      • ANDROID STUDIO
    • MCQ
      • AKTU MCQ
        • RPA MCQ
        • COA MCQ
        • HPC MCQ
        • SPM MCQ
        • Renewable Energy All MCQ
        • Data Compression MCQ
        • Data Structure MCQ
        • Digital Image Processing MCQ
        • Software Engineering MCQ
        • Machine Learning MCQ
        • Artificial Intelligence MCQ
      • D PHARMA MCQ
        • Pharmaceutics – I MCQ
        • Pharmacognosy MCQ
        • Pharmaceutical Chemistry MCQ
        • Biochemistry and Clinical Pathology MCQ
        • Human Anatomy and Physiology MCQ
        • Heath Education and Community Pharmacy MCQ
    • INTERVIEW QUESTIONS
      • Flutter Interview Questions
      • INTERVIEW QUESTIONS
      • Python Interview Questions
      • Coding ninjas solution
    • MORE
      • WORDPRESS
        • SEO
        • TOP 10 WORDPRESS THEME
      • PRODUCTIVITY
      • Program
      • QUOTES
    DeepCrazyWorld
    Home»ANDROID APP»How to make PDF Viewer app in android studio with source code
    ANDROID APP

    How to make PDF Viewer app in android studio with source code

    DeepikaBy DeepikaOctober 11, 2020Updated:January 19, 2022No Comments2 Mins Read

    PDF Viewer app in android studio , PDF Viewer Application – How to design pdf android app in android studio with source code , in this have upload your own pdf file than open it on app easily .

    • minSdkVersion 21
    • targetSdkVersion 30
    • versionCode 1
    • versionName “1.0”
    • Android studio 4.0.1

    Table of Contents

    Toggle
    • MainActivity.java
    • activity_main.xml
    • Manifest.xml
    • ADD DEPENDENCY IN GRADLE FILE
    • YOUTUBE VIDEO
    • gradle.app
    • style.xml
    • colors.xml
    • READ MORE ANDROID APPS
    • READ MORE

    MainActivity.java

    package com.technic.pdfviewer;
    
    import android.os.Bundle;
    import android.widget.EditText;
    import android.widget.TextView;
    
    import androidx.appcompat.app.AppCompatActivity;
    
    import com.github.barteksc.pdfviewer.PDFView;
    
    public class MainActivity extends AppCompatActivity {
        private int current_page=0;
        EditText textEdit;
        TextView textview;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            PDFView pdfView=(PDFView)findViewById(R.id.pdfView);
            pdfView.fromAsset("rub.pdf") .load();
        }
    }
    
    <img decoding=

    activity_main.xml

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/activity_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:paddingLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/activity_horizontal_margin"
        android:paddingTop="@dimen/activity_vertical_margin"
        tools:context=".MainActivity"
        android:weightSum="1">
        <com.github.barteksc.pdfviewer.PDFView
            android:id="@+id/pdfView"
            android:layout_width="match_parent"
            android:layout_height="352dp"
            android:layout_weight="1.18" />
    
    </LinearLayout>
    

    Manifest.xml

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.technic.pdfviewer">
    
        <application
            android:allowBackup="true"
            android:icon="@drawable/logo"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme">
            <activity android:name=".MainActivity">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    
    </manifest>

    ADD DEPENDENCY IN GRADLE FILE

    implementation 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
    implementation 'com.github.barteksc:android-pdf-viewer:1.4.0'

    YOUTUBE VIDEO


    gradle.app

    apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 30
        buildToolsVersion "30.0.2"
    
        defaultConfig {
            applicationId "com.technic.pdfviewer"
            minSdkVersion 21
            targetSdkVersion 30
            versionCode 1
            versionName "1.0"
    
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }
    
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        implementation fileTree(dir: "libs", include: ["*.jar"])
        implementation 'androidx.appcompat:appcompat:1.2.0'
        implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test.ext:junit:1.1.2'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    
        implementation 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
        implementation 'com.github.barteksc:android-pdf-viewer:1.4.0'
    
    }

    style.xml

    <resources>
    
        <!-- Base application theme. -->
        <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
            <!-- Customize your theme here. -->
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
        </style>
    
    </resources>
    

    colors.xml

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <color name="colorPrimary">#3F51B5</color>
        <color name="colorPrimaryDark">#303F9F</color>
        <color name="colorAccent">#FF4081</color>
    </resources>
    

    READ MORE ANDROID APPS

    Wallpaper Android App- CLICK HERE

    All IN ONE Status Saver App – CLICK HERE

    Photo Video Maker Android App – CLICK HERE

    Video Downloader Android App – CLICK HERE

    College Student Portal System App – CLICK HERE

    Call Recorder Android App – CLICK HERE

    PDF Reader App with firebase – CLICK HERE

    ShareIt Clone App – CLICK HERE

    Design Grid Layout and Card layout – CLICK HERE

    Modern Profile UI Design – CLICK HERE

    This image has an empty alt attribute; its file name is like.png

    Don’t Forget to Share this Post.

    ShareTweetShare

    READ MORE

    Share. Facebook Twitter LinkedIn WhatsApp Telegram Pinterest Reddit Email
    Previous ArticleBest Ludo Game Web & App Design Development
    Next Article How to Design Grid Layout and Card View Layout in Android Studio

    Related Posts

    Music player app in flutter and dart using node.js music API

    ANDROID APP 2 Mins Read

    How to create Simple movie app with Source code 2023

    ANDROID APP 4 Mins Read

    Scratch to Win Android Earning App (Admob, FB Ads, StartApp, Unity Ads)

    ANDROID APP 2 Mins Read

    Covid-19 Tracker App(Coronavirus Tracker) source code 2023

    ANDROID APP 3 Mins Read

    Leave A Reply Cancel Reply

    Recent Posts
    • Implementing a Dynamic FAQ Screen UI in Flutter Using ExpansionTile March 29, 2025
    • Creating an Instruction UI Screen in Flutter Application March 29, 2025
    • Animated Backgrounds in Flutter: A Complete Guide March 15, 2025
    • How to make Diary App using flutter stepwise using getx August 31, 2024
    • How to Create Music Player UI screen with fully functional in flutter August 30, 2024
    • How to make ListView Builder Ui in flutter with Source Code August 29, 2024
    • Create a TabBar View in flutter with fully functional stepwise August 28, 2024
    • How to create TabBar view in flutter with source code step wise August 27, 2024
    • How to make Heart rate measure app with Flutter stepwise August 26, 2024
    • How to make ChatGpt App in flutter with source code Stepwise August 25, 2024
    Facebook Twitter Instagram Pinterest YouTube
    • About
    • Contact
    • Disclaimer
    • Privacy Policy
    Copyright by DeepCrazyWorld © 2025

    Type above and press Enter to search. Press Esc to cancel.