diff --git a/.gitignore b/.gitignore
index 5db03072..618dbb69 100755
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,7 @@
/captures
.externalNativeBuild
/.idea/caches/build_file_checksums.ser
-/.idea/caches/gradle_models.ser
\ No newline at end of file
+/.idea/caches/gradle_models.ser
+
+/.direnv/
+/.envrc
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 95b7d112..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-language: android
-jdk: oraclejdk8
-sudo: required
-
-notifications:
- slack: pdfviewerplus:ODw20YfhNtVZkbdA4K3mVFnS
-
-env:
- global:
- - ANDROID_API_LEVEL=30
- - ANDROID_BUILD_TOOLS_VERSION=29.0.2
- - ANDROID_ABI=armeabi-v7a
-
-android:
- components:
- - tools
- - platform-tools
- - tools
- - extra-android-m2repository
- licenses:
- - 'android-sdk-preview-license-52d11cd2'
- - 'android-sdk-license-.+'
- - 'google-gdk-license-.+'
-
-before_install:
- - touch $HOME/.android/repositories.cfg
- - yes | sdkmanager "platforms;android-30"
- - yes | sdkmanager "build-tools;29.0.2"
-
-before_cache:
- - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
-
-cache:
- directories:
- - $HOME/.gradle/caches/
- - $HOME/.gradle/wrapper/
- - $HOME/.android/build-cache
-
-before_script:
- - chmod +x gradlew
-
-script:
- - ./gradlew clean build
- - ./gradlew test
diff --git a/LICENSE b/LICENSE
deleted file mode 100755
index a33e4735..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2018 Gokul Swaminathan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/README.md b/README.md
deleted file mode 100755
index fb1344c9..00000000
--- a/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
-
Pdf Viewer Plus
-
-
-
-
-[//]: # (Shields)
-
-[](https://travis-ci.com/JavaCafe01/PdfViewer)
-[](https://github.com/JavaCafe01/PdfViewer/blob/master/LICENSE)
-
-
-
-

-
-## Screenshots
-
-| Main Page | Main Page | Cyanea |
-|:-:|:-:|:-:|
-|
|
|
|
-
-## Permissions and privacy
-This app does not collect any data.
-The following permissions are required to provide specific features in the app:
-* *Internet*: For opening PDFs through links
-* *Storage*: For saving downloading PDFs and opening them from storage
-
-## Contribute
-
-You can contribute to this project in many ways:
-* Fork and make pull requests (please target dev branch)
-* Help to translate the application (By making PR)
-
-### Contributors
-
-
-
-
-
-Made with [contributors-img](https://contrib.rocks)
-
-## License
-
-Pdf Viewer Plus is made available under the terms of the [MIT License](https://opensource.org/licenses/MIT).
-```
-MIT License
-
-Copyright (c) 2018 Gokul Swaminathan
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-```
-
-
diff --git a/app/.gitignore b/app/.gitignore
old mode 100755
new mode 100644
index 67e07b8f..42afabfd
--- a/app/.gitignore
+++ b/app/.gitignore
@@ -1,2 +1 @@
-/build
-/release
+/build
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
old mode 100755
new mode 100644
index 84421102..4673dd48
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,89 +1,67 @@
-/*
- * MIT License
- *
- * Copyright (c) 2018 Gokul Swaminathan
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-apply plugin: 'com.android.application'
+plugins {
+ id 'com.android.application'
+ id 'org.jetbrains.kotlin.android'
+}
android {
+ namespace 'com.gsnathan.pdfviewer'
+ compileSdk 33
- lintOptions {
- checkReleaseBuilds false
- abortOnError false
- }
-
- buildToolsVersion "30.0.3"
- compileSdkVersion 30
defaultConfig {
applicationId "com.gsnathan.pdfviewer"
- minSdkVersion 21
- targetSdkVersion 30
- versionCode 28
- versionName "3.7"
- vectorDrawables.useSupportLibrary = true
- }
+ minSdk 24
+ targetSdk 33
+ versionCode 1
+ versionName "1.0"
- buildFeatures {
- viewBinding true
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
+ vectorDrawables {
+ useSupportLibrary true
+ }
}
buildTypes {
release {
- debuggable false
- minifyEnabled true
- shrinkResources true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
-
- debug {
- debuggable true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+ kotlinOptions {
+ jvmTarget = '1.8'
+ }
+ buildFeatures {
+ compose true
+ }
+ composeOptions {
+ kotlinCompilerExtensionVersion '1.3.2'
+ }
+ packagingOptions {
+ resources {
+ excludes += '/META-INF/{AL2.0,LGPL2.1}'
+ }
+ }
}
dependencies {
- implementation 'androidx.appcompat:appcompat:1.3.0-beta01'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
-
- // DO NOT UPDATE! otherwise dialog buttons will have the wrong color (conflicts with Cyanea)
- implementation 'com.google.android.material:material:1.0.0'
- //Intro Library
- implementation 'com.github.paolorotolo:appintro:v5.1.0'
-
- //Pdf Viewer Library (Proguard config done)
- implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'
-
- //License Presenter Library (Proguard config not needed)
- implementation 'com.github.franmontiel:AttributionPresenter:1.0.1'
-
- //Changelog Library (Proguard config not needed)
- implementation 'io.github.tonnyl:whatsnew:0.1.1'
-
- //Theme Engine
- implementation 'com.jaredrummler:cyanea:1.0.2'
-}
+ implementation 'androidx.core:core-ktx:1.8.0'
+ implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
+ implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
+ implementation 'androidx.activity:activity-compose:1.5.1'
+ implementation platform('androidx.compose:compose-bom:2022.10.00')
+ implementation 'androidx.compose.ui:ui'
+ implementation 'androidx.compose.ui:ui-graphics'
+ implementation 'androidx.compose.ui:ui-tooling-preview'
+ implementation 'androidx.compose.material3:material3'
+ testImplementation 'junit:junit:4.13.2'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.3'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
+ androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
+ androidTestImplementation 'androidx.compose.ui:ui-test-junit4'
+ debugImplementation 'androidx.compose.ui:ui-tooling'
+ debugImplementation 'androidx.compose.ui:ui-test-manifest'
+}
\ No newline at end of file
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
old mode 100755
new mode 100644
index 04d8c095..481bb434
--- a/app/proguard-rules.pro
+++ b/app/proguard-rules.pro
@@ -18,6 +18,4 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
-#-renamesourcefileattribute SourceFile
-
--keep class com.shockwave.**
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/app/src/androidTest/java/com/gsnathan/pdfviewer/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/gsnathan/pdfviewer/ExampleInstrumentedTest.kt
new file mode 100644
index 00000000..57ec9986
--- /dev/null
+++ b/app/src/androidTest/java/com/gsnathan/pdfviewer/ExampleInstrumentedTest.kt
@@ -0,0 +1,24 @@
+package com.gsnathan.pdfviewer
+
+import androidx.test.platform.app.InstrumentationRegistry
+import androidx.test.ext.junit.runners.AndroidJUnit4
+
+import org.junit.Test
+import org.junit.runner.RunWith
+
+import org.junit.Assert.*
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+@RunWith(AndroidJUnit4::class)
+class ExampleInstrumentedTest {
+ @Test
+ fun useAppContext() {
+ // Context of the app under test.
+ val appContext = InstrumentationRegistry.getInstrumentation().targetContext
+ assertEquals("com.gsnathan.pdfviewer", appContext.packageName)
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
old mode 100755
new mode 100644
index 85ad8f3a..4d4cb5f1
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,102 +1,28 @@
-
-
-
-
+ xmlns:tools="http://schemas.android.com/tools">
-
+ android:theme="@style/Theme.Pdfviewer"
+ tools:targetApi="31">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:exported="true"
+ android:label="@string/app_name"
+ android:theme="@style/Theme.Pdfviewer">
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/app/src/main/assets/themes/cyanea_themes.json b/app/src/main/assets/themes/cyanea_themes.json
deleted file mode 100755
index a7fb4cfa..00000000
--- a/app/src/main/assets/themes/cyanea_themes.json
+++ /dev/null
@@ -1,717 +0,0 @@
-[
- {
- "theme_name": "Pdf Viewer Plus",
- "base_theme": "LIGHT",
- "primary": "#2481a1",
- "primary_dark": "#2481a1",
- "primary_light": "#2481a1",
- "accent": "#00cc99",
- "accent_dark": "#029873",
- "accent_light": "#03dda6",
- "background": "#FAFAFA",
- "background_dark": "#D4D4D4",
- "background_light": "#FAFAFA"
- },
- {
- "theme_name": "Cyanea",
- "base_theme": "LIGHT",
- "primary": "#FFEE3868",
- "primary_dark": "#FFCA2F58",
- "primary_light": "#FFF0557E",
- "accent": "#FF93C43E",
- "accent_dark": "#FF7CA634",
- "accent_light": "#FFA3CC5A",
- "background": "#FFFAFAFA",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFFAFAFA"
- },
- {
- "theme_name": "Rio",
- "base_theme": "LIGHT",
- "primary": "#FF0B4239",
- "primary_dark": "#FF093830",
- "primary_light": "#FF2F5E56",
- "accent": "#FFE34517",
- "accent_dark": "#FFC03A13",
- "accent_light": "#FFE76039",
- "background": "#FFFAFAFA",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFFAFAFA"
- },
- {
- "theme_name": "Vitamin Sea",
- "base_theme": "LIGHT",
- "primary": "#FF0359AE",
- "primary_dark": "#FF024B93",
- "primary_light": "#FF2871BA",
- "accent": "#FF14B09B",
- "accent_dark": "#FF119583",
- "accent_light": "#FF37BBA9",
- "background": "#FFEBE5D9",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFEEE8DE"
- },
- {
- "theme_name": "Textile Dyes",
- "base_theme": "LIGHT",
- "primary": "#FF32435F",
- "primary_dark": "#FF2A3850",
- "primary_light": "#FF505F77",
- "accent": "#FFEB9772",
- "accent_dark": "#FFC78060",
- "accent_light": "#FFEEA687",
- "background": "#FFFDDCCA",
- "background_dark": "#FFD7D1C5",
- "background_light": "#FFFDE1D1"
- },
- {
- "theme_name": "Brave",
- "base_theme": "DARK",
- "primary": "#FF3E9AB4",
- "primary_dark": "#FF348299",
- "primary_light": "#FF5AA9BF",
- "accent": "#FFEE6000",
- "accent_dark": "#FFCA5100",
- "accent_light": "#FFF07726",
- "background": "#FF1D1D24",
- "background_dark": "#FF18181E",
- "background_light": "#FF3E3E44"
- },
- {
- "theme_name": "Ashen",
- "base_theme": "DARK",
- "primary": "#FFFC474A",
- "primary_dark": "#FFD63C3E",
- "primary_light": "#FFFC6265",
- "accent": "#FF3BB7CB",
- "accent_dark": "#FF329BAC",
- "accent_light": "#FF58C1D2",
- "background": "#FF151919",
- "background_dark": "#FF111515",
- "background_light": "#FF383B3B"
- },
- {
- "theme_name": "RecognEyes",
- "base_theme": "DARK",
- "primary": "#FF00D0D0",
- "primary_dark": "#FF00B0B0",
- "primary_light": "#FF26D7D7",
- "accent": "#FFFF8080",
- "accent_dark": "#FFD86C6C",
- "accent_light": "#FFFF9393",
- "background": "#FF101020",
- "background_dark": "#FF0D0D1B",
- "background_light": "#FF333341"
- },
- {
- "theme_name": "Monokai",
- "base_theme": "DARK",
- "primary": "#FF66CCB3",
- "primary_dark": "#FF56AD98",
- "primary_light": "#FF7CD3BE",
- "accent": "#FF5B80BF",
- "accent_dark": "#FF4D6CA2",
- "accent_light": "#FF7393C8",
- "background": "#FF272822",
- "background_dark": "#FF21221C",
- "background_light": "#FF474843"
- },
- {
- "theme_name": "SigFig",
- "base_theme": "LIGHT",
- "primary": "#FFF7F6F3",
- "primary_dark": "#FF524E4A",
- "primary_light": "#FFF8F7F4",
- "accent": "#FFF05A50",
- "accent_dark": "#FFCC4C44",
- "accent_light": "#FFF2726A",
- "background": "#FFF0EEE8",
- "background_dark": "#FFCCCAC5",
- "background_light": "#FFF2F0EB"
- },
- {
- "theme_name": "SoundCloud",
- "base_theme": "LIGHT",
- "primary": "#FFFFFFFF",
- "primary_dark": "#FFD8D8D8",
- "primary_light": "#FFFFFFFF",
- "accent": "#FFE65100",
- "accent_dark": "#FFC34400",
- "accent_light": "#FFE96B26",
- "background": "#FFFFFFFF",
- "background_dark": "#FFD8D8D8",
- "background_light": "#FFFFFFFF"
- },
- {
- "theme_name": "Material light",
- "base_theme": "LIGHT",
- "primary": "#FF263238",
- "primary_dark": "#FF202A2F",
- "primary_light": "#FFC9D787",
- "accent": "#FF009688",
- "accent_dark": "#FF007F73",
- "accent_light": "#FFFFC0A9",
- "background": "#FFF3F3F3",
- "background_dark": "#FFCECECE",
- "background_light": "#FFF4F4F4"
- },
- {
- "theme_name": "Holo light",
- "base_theme": "LIGHT",
- "primary": "#FF222222",
- "primary_dark": "#FF1C1C1C",
- "primary_light": "#FF434343",
- "accent": "#FF00DDFF",
- "accent_dark": "#FF00BBD8",
- "accent_light": "#FF26E2FF",
- "background": "#FFF3F3F3",
- "background_dark": "#FFCECECE",
- "background_light": "#FFF4F4F4"
- },
- {
- "theme_name": "Material dark",
- "base_theme": "DARK",
- "primary": "#FF263238",
- "primary_dark": "#FF202A2F",
- "primary_light": "#FFC9D787",
- "accent": "#FF009688",
- "accent_dark": "#FF007F73",
- "accent_light": "#FFFFC0A9",
- "background": "#FF000000",
- "background_dark": "#FF000000",
- "background_light": "#FF262626"
- },
- {
- "theme_name": "Holo dark",
- "base_theme": "DARK",
- "primary": "#FF222222",
- "primary_dark": "#FF1C1C1C",
- "primary_light": "#FF434343",
- "accent": "#FF00DDFF",
- "accent_dark": "#FF00BBD8",
- "accent_light": "#FF26E2FF",
- "background": "#FF000000",
- "background_dark": "#FF000000",
- "background_light": "#FF262626"
- },
- {
- "theme_name": "Cherry pie",
- "base_theme": "DARK",
- "primary": "#FF46070B",
- "primary_dark": "#FF3B0509",
- "primary_light": "#FF612C2F",
- "accent": "#FFFC1604",
- "accent_dark": "#FFD61203",
- "accent_light": "#FFFC3829",
- "background": "#FF060000",
- "background_dark": "#FF050000",
- "background_light": "#FF2B2626"
- },
- {
- "theme_name": "Olive",
- "base_theme": "DARK",
- "primary": "#FF40411E",
- "primary_dark": "#FF363719",
- "primary_light": "#FF5C5D3F",
- "accent": "#FFC03000",
- "accent_dark": "#FFA32800",
- "accent_light": "#FFC94F26",
- "background": "#FF1B1C0B",
- "background_dark": "#FF161709",
- "background_light": "#FF3D3E2F"
- },
- {
- "theme_name": "Tasty",
- "base_theme": "LIGHT",
- "primary": "#FF437356",
- "primary_dark": "#FF386149",
- "primary_light": "#FF5F876F",
- "accent": "#FFF34A53",
- "accent_dark": "#FFCE3E46",
- "accent_light": "#FFF4656C",
- "background": "#FFFEF7E8",
- "background_dark": "#FFD7D1C5",
- "background_light": "#FFFEF8EB"
- },
- {
- "theme_name": "Desert",
- "base_theme": "LIGHT",
- "primary": "#FF5D3C1B",
- "primary_dark": "#FF4F3316",
- "primary_light": "#FF75593D",
- "accent": "#FF90A04A",
- "accent_dark": "#FF7A883E",
- "accent_light": "#FFA0AE65",
- "background": "#FFF3EEE4",
- "background_dark": "#FFCECAC1",
- "background_light": "#FFF4F0E8"
- },
- {
- "theme_name": "Weber",
- "base_theme": "LIGHT",
- "primary": "#FF729F98",
- "primary_dark": "#FF608781",
- "primary_light": "#FF87ADA7",
- "accent": "#FFAA863A",
- "accent_dark": "#FF907131",
- "accent_light": "#FFB69857",
- "background": "#FFF0ECEB",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFF2EEEE"
- },
- {
- "theme_name": "Philips",
- "base_theme": "LIGHT",
- "primary": "#FF2F435E",
- "primary_dark": "#FF27384F",
- "primary_light": "#FF4E5F76",
- "accent": "#FF4B5E65",
- "accent_dark": "#FF3F4F55",
- "accent_light": "#FF66767C",
- "background": "#FFECECEC",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFEEEEEE"
- },
- {
- "theme_name": "Instagram",
- "base_theme": "DARK",
- "primary": "#FF517FA4",
- "primary_dark": "#FF446B8B",
- "primary_light": "#FF6B92B1",
- "accent": "#FF517FA4",
- "accent_dark": "#FF446B8B",
- "accent_light": "#FF6B92B1",
- "background": "#FF161819",
- "background_dark": "#FF121415",
- "background_light": "#FF383A3B"
- },
- {
- "theme_name": "Reddit",
- "base_theme": "DARK",
- "primary": "#FF000000",
- "primary_dark": "#FF000000",
- "primary_light": "#FF262626",
- "accent": "#FFFF3D00",
- "accent_dark": "#FFD83300",
- "accent_light": "#FFFF5A26",
- "background": "#FF212121",
- "background_dark": "#FF1C1C1C",
- "background_light": "#FF424242"
- },
- {
- "theme_name": "Waaark",
- "base_theme": "DARK",
- "primary": "#FFF76C6C",
- "primary_dark": "#FFD15B5B",
- "primary_light": "#FFF88282",
- "accent": "#FFA8D0E6",
- "accent_dark": "#FF8EB0C3",
- "accent_light": "#FFB5D7E9",
- "background": "#FF24305E",
- "background_dark": "#FF1E284F",
- "background_light": "#FF444F76"
- },
- {
- "theme_name": "Flax",
- "base_theme": "DARK",
- "primary": "#FF2B2F48",
- "primary_dark": "#FF24273D",
- "primary_light": "#FF4A4E63",
- "accent": "#FFECBC1B",
- "accent_dark": "#FFC89F16",
- "accent_light": "#FFEEC63D",
- "background": "#FF21263A",
- "background_dark": "#FF1C2031",
- "background_light": "#FF424657"
- },
- {
- "theme_name": "Bing",
- "base_theme": "LIGHT",
- "primary": "#FFFFB900",
- "primary_dark": "#FFD89D00",
- "primary_light": "#FFFFC326",
- "accent": "#FF61B3DE",
- "accent_dark": "#FF5298BC",
- "accent_light": "#FF78BEE2",
- "background": "#FFFAFAFA",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFFAFAFA"
- },
- {
- "theme_name": "Meetup",
- "base_theme": "LIGHT",
- "primary": "#FFED1744",
- "primary_dark": "#FFC91339",
- "primary_light": "#FFEF3960",
- "accent": "#FF1DE9B6",
- "accent_dark": "#FF18C69A",
- "accent_light": "#FF3EECC0",
- "background": "#FFFAFAFA",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFFAFAFA"
- },
- {
- "theme_name": "Coffee",
- "base_theme": "LIGHT",
- "primary": "#FF562C22",
- "primary_dark": "#FF49251C",
- "primary_light": "#FF6F4B43",
- "accent": "#FFA55634",
- "accent_dark": "#FF8C492C",
- "accent_light": "#FFB26F52",
- "background": "#FFEEDFD8",
- "background_dark": "#FFCABDB7",
- "background_light": "#FFF0E3DD"
- },
- {
- "theme_name": "Sepia",
- "base_theme": "LIGHT",
- "primary": "#FF6D4C41",
- "primary_dark": "#FF5C4037",
- "primary_light": "#FF82665D",
- "accent": "#FFE64A19",
- "accent_dark": "#FFC33E15",
- "accent_light": "#FFE9653B",
- "background": "#FFF2F8E9",
- "background_dark": "#FFCDD2C6",
- "background_light": "#FFF3F9EC"
- },
- {
- "theme_name": "Oblivion",
- "base_theme": "DARK",
- "primary": "#FFD25252",
- "primary_dark": "#FFB24545",
- "primary_light": "#FFD86B6B",
- "accent": "#FF7FB347",
- "accent_dark": "#FF6B983C",
- "accent_light": "#FF92BE62",
- "background": "#FF1E1E1E",
- "background_dark": "#FF191919",
- "background_light": "#FF3F3F3F"
- },
- {
- "theme_name": "Obsidian",
- "base_theme": "DARK",
- "primary": "#FF678CB1",
- "primary_dark": "#FF577796",
- "primary_light": "#FF7D9DBC",
- "accent": "#FF93C763",
- "accent_dark": "#FF7CA954",
- "accent_light": "#FFA3CF7A",
- "background": "#FF293134",
- "background_dark": "#FF22292C",
- "background_light": "#FF494F52"
- },
- {
- "theme_name": "Forrest",
- "base_theme": "DARK",
- "primary": "#FF2C3801",
- "primary_dark": "#FF252F00",
- "primary_light": "#FF4B5527",
- "accent": "#FF9ECD68",
- "accent_dark": "#FF86AE58",
- "accent_light": "#FFACD47E",
- "background": "#FF0C1000",
- "background_dark": "#FF0A0D00",
- "background_light": "#FF303326"
- },
- {
- "theme_name": "Dawn",
- "base_theme": "DARK",
- "primary": "#FF65353E",
- "primary_dark": "#FF552D34",
- "primary_light": "#FF7C535A",
- "accent": "#FFD55246",
- "accent_dark": "#FFB5453B",
- "accent_light": "#FFDB6B61",
- "background": "#FF0C0006",
- "background_dark": "#FF0A0005",
- "background_light": "#FF30262B"
- },
- {
- "theme_name": "Twitter",
- "base_theme": "LIGHT",
- "primary": "#FF00ACED",
- "primary_dark": "#FF0084B4",
- "primary_light": "#FF26B8EF",
- "accent": "#FF00ACED",
- "accent_dark": "#FF0092C9",
- "accent_light": "#FF26B8EF",
- "background": "#FFFAFAFA",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFFAFAFA"
- },
- {
- "theme_name": "Periscope",
- "base_theme": "LIGHT",
- "primary": "#FF40A4C4",
- "primary_dark": "#FF368BA6",
- "primary_light": "#FF5CB1CC",
- "accent": "#FFD75444",
- "accent_dark": "#FFB64739",
- "accent_light": "#FFDD6D60",
- "background": "#FFFFFFFF",
- "background_dark": "#FFD8D8D8",
- "background_light": "#FFFFFFFF"
- },
- {
- "theme_name": "Subdued",
- "base_theme": "LIGHT",
- "primary": "#FF283B42",
- "primary_dark": "#FF223238",
- "primary_light": "#FF48585E",
- "accent": "#FF1D6A96",
- "accent_dark": "#FF185A7F",
- "accent_light": "#FF3E80A5",
- "background": "#FFE2EAE9",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFE6EDEC"
- },
- {
- "theme_name": "Misty Green",
- "base_theme": "LIGHT",
- "primary": "#FF003E19",
- "primary_dark": "#FF003415",
- "primary_light": "#FF265A3B",
- "accent": "#FF028C6A",
- "accent_dark": "#FF01775A",
- "accent_light": "#FF279D80",
- "background": "#FFD1EDE1",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFD7EFE5"
- },
- {
- "theme_name": "Waterfall",
- "base_theme": "DARK",
- "primary": "#FF1D3847",
- "primary_dark": "#FF182F3C",
- "primary_light": "#FF3E5562",
- "accent": "#FF03A9F4",
- "accent_dark": "#FF028FCF",
- "accent_light": "#FF28B5F5",
- "background": "#FF091318",
- "background_dark": "#FF071014",
- "background_light": "#FF2D363A"
- },
- {
- "theme_name": "Retro",
- "base_theme": "DARK",
- "primary": "#FF123943",
- "primary_dark": "#FF0F3038",
- "primary_light": "#FF35565F",
- "accent": "#FFAE2332",
- "accent_dark": "#FF931D2A",
- "accent_light": "#FFBA4450",
- "background": "#FF1C170D",
- "background_dark": "#FF17130B",
- "background_light": "#FF3E3931"
- },
- {
- "theme_name": "Inkpot",
- "base_theme": "DARK",
- "primary": "#FF6068B2",
- "primary_dark": "#FF515897",
- "primary_light": "#FF777EBD",
- "accent": "#FF5AC0FF",
- "accent_dark": "#FF4CA3D8",
- "accent_light": "#FF72C9FF",
- "background": "#FF1F1F27",
- "background_dark": "#FF1A1A21",
- "background_light": "#FF404047"
- },
- {
- "theme_name": "Vibrant Ink",
- "base_theme": "DARK",
- "primary": "#FFEC691E",
- "primary_dark": "#FFC85919",
- "primary_light": "#FFEE7F3F",
- "accent": "#FF9CF828",
- "accent_dark": "#FF84D222",
- "accent_light": "#FFAAF948",
- "background": "#FF191919",
- "background_dark": "#FF151515",
- "background_light": "#FF3B3B3B"
- },
- {
- "theme_name": "Fresh",
- "base_theme": "LIGHT",
- "primary": "#FF748A96",
- "primary_dark": "#FF62757F",
- "primary_light": "#FF889BA5",
- "accent": "#FF8A36BB",
- "accent_dark": "#FF752D9E",
- "accent_light": "#FF9B54C5",
- "background": "#FFFFFCF1",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFFFFCF3"
- },
- {
- "theme_name": "Cote azur",
- "base_theme": "LIGHT",
- "primary": "#FF00585F",
- "primary_dark": "#FF004A50",
- "primary_light": "#FF267177",
- "accent": "#FFFF3800",
- "accent_dark": "#FFD82F00",
- "accent_light": "#FFFF5526",
- "background": "#FFFAFAFA",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFFAFAFA"
- },
- {
- "theme_name": "QED",
- "base_theme": "LIGHT",
- "primary": "#FF22264B",
- "primary_dark": "#FF1C203F",
- "primary_light": "#FF434666",
- "accent": "#FFB56969",
- "accent_dark": "#FF995959",
- "accent_light": "#FFC07F7F",
- "background": "#FFE8EDF3",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFEBEFF4"
- },
- {
- "theme_name": "Vintage",
- "base_theme": "LIGHT",
- "primary": "#FF1D2125",
- "primary_dark": "#FF181C1F",
- "primary_light": "#FF3E4245",
- "accent": "#FF8C2D2D",
- "accent_dark": "#FF772626",
- "accent_light": "#FF9D4C4C",
- "background": "#FFFBF9E9",
- "background_dark": "#FFD6D3B7",
- "background_light": "#FFF8F8F8"
- },
- {
- "theme_name": "Spotify",
- "base_theme": "DARK",
- "primary": "#FF262626",
- "primary_dark": "#FF202020",
- "primary_light": "#FF464646",
- "accent": "#FF81B71A",
- "accent_dark": "#FF6D9B16",
- "accent_light": "#FF93C13C",
- "background": "#FF000000",
- "background_dark": "#FF000000",
- "background_light": "#FF262626"
- },
- {
- "theme_name": "Xbox",
- "base_theme": "DARK",
- "primary": "#FF107C10",
- "primary_dark": "#FF0D690D",
- "primary_light": "#FF338F33",
- "accent": "#FF5DC21E",
- "accent_dark": "#FF4FA419",
- "accent_light": "#FF75CB3F",
- "background": "#FF3A3A3A",
- "background_dark": "#FF313131",
- "background_light": "#FF575757"
- },
- {
- "theme_name": "Sublime",
- "base_theme": "DARK",
- "primary": "#FFFF007F",
- "primary_dark": "#FFD8006B",
- "primary_light": "#FFFF2692",
- "accent": "#FF52E3F6",
- "accent_dark": "#FF45C0D1",
- "accent_light": "#FF6BE7F7",
- "background": "#FF272822",
- "background_dark": "#FF21221C",
- "background_light": "#FF474843"
- },
- {
- "theme_name": "Zenburn",
- "base_theme": "DARK",
- "primary": "#FF3F3F6A",
- "primary_dark": "#FF35355A",
- "primary_light": "#FF5B5B80",
- "accent": "#FF8ACCCF",
- "accent_dark": "#FF75ADAF",
- "accent_light": "#FF9BD3D6",
- "background": "#FF404040",
- "background_dark": "#FF363636",
- "background_light": "#FF5C5C5C"
- },
- {
- "theme_name": "Starbucks",
- "base_theme": "LIGHT",
- "primary": "#FF00704A",
- "primary_dark": "#FF005F3E",
- "primary_light": "#FF268565",
- "accent": "#FF66442B",
- "accent_dark": "#FF5A3C26",
- "accent_light": "#FF6C482D",
- "background": "#FFFFFCFC",
- "background_dark": "#FFD3CCCC",
- "background_light": "#FFFFFFFF"
- },
- {
- "theme_name": "Amazon",
- "base_theme": "LIGHT",
- "primary": "#FFFF9900",
- "primary_dark": "#FFD88200",
- "primary_light": "#FFFFA826",
- "accent": "#FF146EB4",
- "accent_dark": "#FF115D99",
- "accent_light": "#FF3783BF",
- "background": "#FFFAFAFA",
- "background_dark": "#FFD4D4D4",
- "background_light": "#FFFAFAFA"
- },
- {
- "theme_name": "Twitch",
- "base_theme": "LIGHT",
- "primary": "#FF7E57C2",
- "primary_dark": "#FF6B49A4",
- "primary_light": "#FF9170CB",
- "accent": "#FF7E57C2",
- "accent_dark": "#FF6B49A4",
- "accent_light": "#FF9170CB",
- "background": "#FFEFEEF1",
- "background_dark": "#FFD7D1C5",
- "background_light": "#FFF1F0F3"
- },
- {
- "theme_name": "Robinhood",
- "base_theme": "LIGHT",
- "primary": "#FF1DE9B6",
- "primary_dark": "#FF18C69A",
- "primary_light": "#FF3EECC0",
- "accent": "#FF1DE9B6",
- "accent_dark": "#FF18C69A",
- "accent_light": "#FF3EECC0",
- "background": "#FFFAFAFA",
- "background_dark": "#FFD7D1C5",
- "background_light": "#FFFAFAFA"
- },
- {
- "theme_name": "Facebook",
- "base_theme": "LIGHT",
- "primary": "#FF3B5998",
- "primary_dark": "#FF324B81",
- "primary_light": "#FF5871A7",
- "accent": "#FF3B5998",
- "accent_dark": "#FF324B81",
- "accent_light": "#FF5871A7",
- "background": "#FFF7F7F7",
- "background_dark": "#FFD1D1D1",
- "background_light": "#FFF8F8F8"
- },
- {
- "theme_name": "Mint",
- "base_theme": "LIGHT",
- "primary": "#FF0AC775",
- "primary_dark": "#FF08A963",
- "primary_light": "#FF2ECF89",
- "accent": "#FFFD8A10",
- "accent_dark": "#FFF2890D",
- "accent_light": "#FFF39425",
- "background": "#FFFFFFFF",
- "background_dark": "#FFD8D8D8",
- "background_light": "#FFFFFFFF"
- }
-]
diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png
deleted file mode 100755
index 8705352c..00000000
Binary files a/app/src/main/ic_launcher-web.png and /dev/null differ
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/AboutActivity.java b/app/src/main/java/com/gsnathan/pdfviewer/AboutActivity.java
deleted file mode 100755
index a2c1c9e1..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/AboutActivity.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2018 Gokul Swaminathan
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.gsnathan.pdfviewer;
-
-import android.app.Dialog;
-import android.content.ActivityNotFoundException;
-import android.os.Bundle;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.Toast;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AlertDialog;
-import androidx.fragment.app.DialogFragment;
-
-import com.franmontiel.attributionpresenter.AttributionPresenter;
-import com.franmontiel.attributionpresenter.entities.Attribution;
-import com.franmontiel.attributionpresenter.entities.License;
-import com.gsnathan.pdfviewer.databinding.ActivityAboutBinding;
-import com.jaredrummler.cyanea.app.CyaneaAppCompatActivity;
-
-public class AboutActivity extends CyaneaAppCompatActivity {
-
- private ActivityAboutBinding viewBinding;
- private final String APP_VERSION_RELEASE = "Version " + Utils.getAppVersion(); //contains Version + the version number
- private final String APP_VERSION_DEBUG = "Version " + Utils.getAppVersion() + "-debug"; //contains Version + the version number + debug
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- viewBinding = ActivityAboutBinding.inflate(getLayoutInflater());
- setContentView(viewBinding.getRoot());
- setVersionText();
- getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- }
-
- private void setVersionText() {
- // check if app is debug
- if (BuildConfig.DEBUG) {
- viewBinding.versionTextView.setText(APP_VERSION_DEBUG);
- } else { //if app is release
- viewBinding.versionTextView.setText(APP_VERSION_RELEASE);
- }
- }
-
- public void replayIntro(View v) {
- //navigate to intro class (replay the intro)
- startActivity(Utils.navIntent(getApplicationContext(), MainIntroActivity.class));
- }
-
- public void showLog(View v) {
- Utils.showLog(this);
- }
-
- public void showPrivacy(View v) {
- new PrivacyInfoDialog().show(getSupportFragmentManager(), "privacy_dialog");
- }
-
- public void showLicense(View v) {
- startActivity(Utils.linkIntent("https://github.com/JavaCafe01/PdfViewer/blob/master/LICENSE"));
- }
-
- public void showLibraries(View v) {
- AttributionPresenter attributionPresenter = new AttributionPresenter.Builder(this)
- .addAttributions(
- new Attribution.Builder("AttributionPresenter")
- .addCopyrightNotice("Copyright 2017 Francisco José Montiel Navarro")
- .addLicense(License.APACHE)
- .setWebsite("https://github.com/franmontiel/AttributionPresenter")
- .build()
- )
- .addAttributions(
- new Attribution.Builder("Android PdfViewer")
- .addCopyrightNotice("Copyright 2017 Bartosz Schiller")
- .addLicense(License.APACHE)
- .setWebsite("https://github.com/barteksc/AndroidPdfViewer")
- .build()
- )
- .addAttributions(
- new Attribution.Builder("AppIntro")
- .addCopyrightNotice("Copyright 2018 Paolo Rotolo")
- .addLicense(License.APACHE)
- .setWebsite("https://github.com/paolorotolo/AppIntro")
- .build()
- )
- .addAttributions(
- new Attribution.Builder("Android Open Source Project")
- .addCopyrightNotice("Copyright 2016 The Android Open Source Project")
- .addLicense(License.APACHE)
- .setWebsite("http://developer.android.com/tools/support-library/index.html")
- .build()
- )
- .addAttributions(
- new Attribution.Builder("Android Support Libraries")
- .addCopyrightNotice("Copyright 2016 The Android Open Source Project")
- .addLicense(License.APACHE)
- .setWebsite("http://developer.android.com/tools/support-library/index.html")
- .build()
- )
- .addAttributions(
- new Attribution.Builder("Material Design Icons")
- .addCopyrightNotice("Copyright 2014, Austin Andrews")
- .addLicense("SIL Open Font", "https://github.com/Templarian/MaterialDesign/blob/master/LICENSE")
- .setWebsite("https://materialdesignicons.com/")
- .build()
- )
- .addAttributions(
- new Attribution.Builder("WhatsNew")
- .addCopyrightNotice("Copyright 2017 Lizhaotailang")
- .addLicense(License.MIT)
- .setWebsite("https://github.com/TonnyL/WhatsNew")
- .build()
- )
- .addAttributions(
- new Attribution.Builder("Cyanea")
- .addCopyrightNotice("Copyright 2018 Jared Rummler")
- .addLicense(License.APACHE)
- .setWebsite("https://github.com/jaredrummler/Cyanea")
- .build()
- )
- .build();
-
- //show license dialogue
- attributionPresenter.showDialog("Open Source Libraries");
- }
-
- public void emailDev(View v) {
- String email = "gokulswamilive@gmail.com";
- try {
- startActivity(Utils.emailIntent(email, "Pdf Viewer Plus", APP_VERSION_RELEASE));
- } catch (ActivityNotFoundException e) {
- Toast.makeText(this, email, Toast.LENGTH_SHORT).show();
- }
- }
-
- public void navToGit(View v) {
- startActivity(Utils.linkIntent("https://github.com/JavaCafe01"));
- }
-
- public void navToSourceCode(View v) {
- startActivity(Utils.linkIntent("https://github.com/JavaCafe01/PdfViewer"));
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- if (item.getItemId() == android.R.id.home) {
- onBackPressed();
- return true;
- }
- return false;
- }
-
- public static class PrivacyInfoDialog extends DialogFragment {
- @NonNull
- @Override
- public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
- AlertDialog.Builder builder = new AlertDialog.Builder(requireContext());
- return builder.setTitle(R.string.privacy)
- .setMessage(R.string.privacy_info)
- .setPositiveButton(R.string.ok, (dialog, which) -> {})
- .setIcon(R.drawable.privacy_icon)
- .create();
- }
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/App.java b/app/src/main/java/com/gsnathan/pdfviewer/App.java
deleted file mode 100755
index 8fbe6f50..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/App.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.gsnathan.pdfviewer;
-
-import android.app.Application;
-import android.content.res.Configuration;
-
-import com.jaredrummler.cyanea.Cyanea;
-
-public class App extends Application {
-
- @Override
- public void onCreate() {
- super.onCreate();
- Cyanea.init(this, getResources());
- }
-
- @Override
- public void onConfigurationChanged(Configuration newConfig) {
- super.onConfigurationChanged(newConfig);
- }
-
- @Override
- public void onLowMemory() {
- super.onLowMemory();
- }
-}
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/DownloadPDFFile.java b/app/src/main/java/com/gsnathan/pdfviewer/DownloadPDFFile.java
deleted file mode 100644
index ce0f03e4..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/DownloadPDFFile.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package com.gsnathan.pdfviewer;
-
-import android.os.AsyncTask;
-import android.util.Log;
-import android.widget.Toast;
-
-import java.io.IOException;
-import java.lang.ref.WeakReference;
-import java.net.HttpURLConnection;
-import java.net.URL;
-
-import javax.net.ssl.SSLException;
-
-import static java.net.HttpURLConnection.HTTP_OK;
-
-/**
- * This class is used to get a PDF File from an URL
- */
-public class DownloadPDFFile extends AsyncTask {
-
- private final WeakReference mainActivityWR;
-
- public DownloadPDFFile(MainActivity activity) {
- mainActivityWR = new WeakReference<>(activity);
- }
-
- @Override
- protected Object doInBackground(String... strings) {
- String url = strings[0];
- HttpURLConnection httpConnection = null;
-
- try {
- httpConnection = (HttpURLConnection) new URL(url).openConnection();
- httpConnection.connect();
- int responseCode = httpConnection.getResponseCode();
- if (responseCode == HTTP_OK) {
- return Utils.readBytesToEnd(httpConnection.getInputStream());
- } else {
- Log.e("DownloadPDFFile", "Error during http request, response code : " + responseCode);
- return responseCode;
- }
- } catch (IOException e) {
- Log.e("DownloadPDFFile", "Error cannot get file at URL : " + url, e);
- return e;
- } finally {
- if (httpConnection != null) {
- httpConnection.disconnect();
- }
- }
- }
-
- @Override
- protected void onPostExecute(Object result) {
- MainActivity activity = mainActivityWR.get();
-
- if (activity != null) {
- activity.hideProgressBar();
-
- if (result == null) {
- Toast.makeText(activity, R.string.toast_generic_download_error, Toast.LENGTH_LONG).show();
- } else if (result instanceof Integer) {
- Toast.makeText(activity, R.string.toast_http_code_error, Toast.LENGTH_LONG).show();
- } else if (result instanceof SSLException) {
- Toast.makeText(activity, R.string.toast_ssl_error, Toast.LENGTH_LONG).show();
- } else if (result instanceof IOException) {
- Toast.makeText(activity, R.string.toast_generic_download_error, Toast.LENGTH_LONG).show();
- } else if (result instanceof byte[]) {
- activity.saveToFileAndDisplay((byte[]) result);
- }
- }
- }
-}
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/MainActivity.java b/app/src/main/java/com/gsnathan/pdfviewer/MainActivity.java
deleted file mode 100755
index 8b62c557..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/MainActivity.java
+++ /dev/null
@@ -1,549 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2018 Gokul Swaminathan
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.gsnathan.pdfviewer;
-
-import android.Manifest;
-import android.app.ActivityManager;
-import android.app.Dialog;
-import android.content.ActivityNotFoundException;
-import android.content.Intent;
-import android.content.SharedPreferences;
-import android.database.Cursor;
-import android.graphics.Color;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.Environment;
-import android.os.StrictMode;
-import android.preference.PreferenceManager;
-import android.print.PrintManager;
-import android.provider.OpenableColumns;
-import android.util.Log;
-import android.view.WindowManager;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.MotionEvent;
-import android.view.View;
-import android.view.Window;
-import android.widget.Toast;
-
-import androidx.activity.result.ActivityResultLauncher;
-import androidx.activity.result.contract.ActivityResultContracts.OpenDocument;
-import androidx.activity.result.contract.ActivityResultContracts.RequestPermission;
-import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.appcompat.app.AlertDialog;
-import androidx.core.content.ContextCompat;
-import androidx.fragment.app.DialogFragment;
-
-import com.github.barteksc.pdfviewer.PDFView;
-import com.github.barteksc.pdfviewer.scroll.DefaultScrollHandle;
-import com.github.barteksc.pdfviewer.util.Constants;
-import com.github.barteksc.pdfviewer.util.FitPolicy;
-import com.gsnathan.pdfviewer.databinding.ActivityMainBinding;
-import com.gsnathan.pdfviewer.databinding.PasswordDialogBinding;
-import com.jaredrummler.cyanea.Cyanea;
-import com.jaredrummler.cyanea.app.CyaneaAppCompatActivity;
-import com.jaredrummler.cyanea.prefs.CyaneaSettingsActivity;
-import com.shockwave.pdfium.PdfDocument;
-import com.shockwave.pdfium.PdfPasswordException;
-
-import org.jetbrains.annotations.NotNull;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-
-import static android.content.pm.PackageManager.PERMISSION_GRANTED;
-
-public class MainActivity extends CyaneaAppCompatActivity {
-
- private static final String TAG = "MainActivity";
-
- private PrintManager mgr;
- private SharedPreferences prefManager;
-
- private Uri uri;
- private int pageNumber = 0;
- private String pdfPassword;
- private String pdfFileName = "";
-
- private byte[] downloadedPdfFileContent;
-
- private boolean isBottomNavigationHidden = false;
- private boolean isFullscreenToggled = false;
-
- private ActivityMainBinding viewBinding;
-
- private final ActivityResultLauncher documentPickerLauncher = registerForActivityResult(
- new OpenDocument(),
- this::openSelectedDocument
- );
-
- private final ActivityResultLauncher saveToDownloadPermissionLauncher = registerForActivityResult(
- new RequestPermission(),
- this::saveDownloadedFileAfterPermissionRequest
- );
-
- private final ActivityResultLauncher readFileErrorPermissionLauncher = registerForActivityResult(
- new RequestPermission(),
- this::restartAppIfGranted
- );
-
- private final ActivityResultLauncher settingsLauncher = registerForActivityResult(
- new StartActivityForResult(),
- result -> displayFromUri(uri)
- );
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- viewBinding = ActivityMainBinding.inflate(getLayoutInflater());
- setContentView(viewBinding.getRoot());
-
- Constants.THUMBNAIL_RATIO = 1f;
- setBottomBarListeners();
-
- // Workaround for https://stackoverflow.com/questions/38200282/
- StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
- StrictMode.setVmPolicy(builder.build());
-
- prefManager = PreferenceManager.getDefaultSharedPreferences(this);
-
- mgr = (PrintManager) getSystemService(PRINT_SERVICE);
- onFirstInstall();
- onFirstUpdate();
-
- if (savedInstanceState != null) {
- restoreInstanceState(savedInstanceState);
- } else {
- uri = getIntent().getData();
- if (uri == null)
- pickFile();
- }
- displayFromUri(uri);
- }
-
- @Override
- public void onResume() {
- super.onResume();
- getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- if (prefManager.getBoolean("screen_on_pref", false)) {
- getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- }
- // Workaround for android:background XML attribute not being applied on all devices
- viewBinding.bottomNavigation.setBackgroundColor(Cyanea.getInstance().getPrimary());
- }
-
- private void onFirstInstall() {
- boolean isFirstRun = prefManager.getBoolean("FIRSTINSTALL", true);
- if (isFirstRun) {
- startActivity(new Intent(this, MainIntroActivity.class));
- SharedPreferences.Editor editor = prefManager.edit();
- editor.putBoolean("FIRSTINSTALL", false);
- editor.apply();
- }
- }
-
- private void onFirstUpdate() {
- boolean isFirstRun = prefManager.getBoolean(Utils.getAppVersion(), true);
- if (isFirstRun) {
- Utils.showLog(this);
- SharedPreferences.Editor editor = prefManager.edit();
- editor.putBoolean(Utils.getAppVersion(), false);
- editor.apply();
- }
- }
-
- @Override
- protected void onSaveInstanceState(@NonNull Bundle outState) {
- outState.putParcelable("uri", uri);
- outState.putInt("pageNumber", pageNumber);
- outState.putString("pdfPassword", pdfPassword);
- super.onSaveInstanceState(outState);
- }
-
- private void restoreInstanceState(Bundle savedState) {
- uri = savedState.getParcelable("uri");
- pageNumber = savedState.getInt("pageNumber");
- pdfPassword = savedState.getString("pdfPassword");
- }
-
- void shareFile() {
- Intent sharingIntent;
- if (uri.getScheme() != null && uri.getScheme().startsWith("http")) {
- sharingIntent = Utils.plainTextShareIntent(getString(R.string.share), uri.toString());
- } else {
- sharingIntent = Utils.fileShareIntent(getString(R.string.share), pdfFileName, uri);
- }
- startActivity(sharingIntent);
- }
-
- private void openSelectedDocument(Uri selectedDocumentUri) {
- if (selectedDocumentUri == null) {
- return;
- }
-
- if (uri == null || selectedDocumentUri.equals(uri)) {
- uri = selectedDocumentUri;
- displayFromUri(uri);
- } else {
- Intent intent = new Intent(this, getClass());
- intent.setData(selectedDocumentUri);
- startActivity(intent);
- }
- }
-
- private void pickFile() {
- try {
- documentPickerLauncher.launch(new String[] { "application/pdf" });
- } catch (ActivityNotFoundException e) {
- //alert user that file manager not working
- Toast.makeText(this, R.string.toast_pick_file_error, Toast.LENGTH_SHORT).show();
- }
- }
-
- private void setBottomBarListeners() {
- viewBinding.bottomNavigation.setOnNavigationItemSelectedListener(item -> {
- switch (item.getItemId()) {
- case R.id.pickFile:
- pickFile();
- break;
- case R.id.metaFile:
- if (uri != null)
- showPdfMetaDialog();
- break;
- case R.id.shareFile:
- if (uri != null)
- shareFile();
- break;
- case R.id.printFile:
- if (uri != null)
- printDocument();
- break;
- case R.id.fullscreen:
- toggleFullscreen();
- return true;
- default:
- break;
- }
- return false;
- });
- }
-
- void configurePdfViewAndLoad(PDFView.Configurator viewConfigurator) {
- if (!prefManager.getBoolean("pdftheme_pref", false)) {
- viewBinding.pdfView.setBackgroundColor(Color.LTGRAY);
- } else {
- viewBinding.pdfView.setBackgroundColor(0xFF212121);
- }
- viewBinding.pdfView.useBestQuality(prefManager.getBoolean("quality_pref", false));
- viewBinding.pdfView.setMinZoom(0.5f);
- viewBinding.pdfView.setMidZoom(2.0f);
- viewBinding.pdfView.setMaxZoom(5.0f);
- viewConfigurator
- .defaultPage(pageNumber)
- .onPageChange(this::setCurrentPage)
- .enableAnnotationRendering(true)
- .enableAntialiasing(prefManager.getBoolean("alias_pref", true))
- .onTap(this::toggleBottomNavigationVisibility)
- .onPageScroll(this::toggleBottomNavigationAccordingToPosition)
- .scrollHandle(new DefaultScrollHandle(this))
- .spacing(10) // in dp
- .onError(this::handleFileOpeningError)
- .onPageError((page, err) -> Log.e(TAG, "Cannot load page " + page, err))
- .pageFitPolicy(FitPolicy.WIDTH)
- .password(pdfPassword)
- .swipeHorizontal(prefManager.getBoolean("scroll_pref", false))
- .autoSpacing(prefManager.getBoolean("scroll_pref", false))
- .pageSnap(prefManager.getBoolean("snap_pref", false))
- .pageFling(prefManager.getBoolean("fling_pref", false))
- .nightMode(prefManager.getBoolean("pdftheme_pref", false))
- .load();
- }
-
- private void handleFileOpeningError(Throwable exception) {
- if (exception instanceof PdfPasswordException) {
- if (pdfPassword != null) {
- Toast.makeText(this, R.string.wrong_password, Toast.LENGTH_SHORT).show();
- pdfPassword = null; // prevent the toast from being shown again if the user rotates the screen
- }
- askForPdfPassword();
- } else if (couldNotOpenFileDueToMissingPermission(exception)) {
- readFileErrorPermissionLauncher.launch(Manifest.permission.READ_EXTERNAL_STORAGE);
- } else {
- Toast.makeText(this, R.string.file_opening_error, Toast.LENGTH_LONG).show();
- Log.e(TAG, "Error when opening file", exception);
- }
- }
-
- private boolean couldNotOpenFileDueToMissingPermission(Throwable e) {
- if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_EXTERNAL_STORAGE) == PERMISSION_GRANTED)
- return false;
-
- String exceptionMessage = e.getMessage();
- return e instanceof FileNotFoundException &&
- exceptionMessage != null && exceptionMessage.contains("Permission denied");
- }
-
- private void restartAppIfGranted(boolean isPermissionGranted) {
- if (isPermissionGranted) {
- // This is a quick and dirty way to make the system restart the current activity *and the current app process*.
- // This is needed because on Android 6 storage permission grants do not take effect until
- // the app process is restarted.
- System.exit(0);
- } else {
- Toast.makeText(this, R.string.file_opening_error, Toast.LENGTH_LONG).show();
- }
- }
-
- private void toggleBottomNavigationAccordingToPosition(int page, float positionOffset) {
- if (positionOffset == 0) {
- showBottomNavigationView();
- } else if (!isBottomNavigationHidden) {
- hideBottomNavigationView();
- }
- }
-
- private boolean toggleBottomNavigationVisibility(MotionEvent e) {
- if (isBottomNavigationHidden) {
- showBottomNavigationView();
- } else {
- hideBottomNavigationView();
- }
- return true;
- }
-
- private void hideBottomNavigationView() {
- isBottomNavigationHidden = true;
- viewBinding.bottomNavigation.animate()
- .translationY(viewBinding.bottomNavigation.getHeight())
- .setDuration(100);
- }
-
- private void showBottomNavigationView() {
- isBottomNavigationHidden = false;
- viewBinding.bottomNavigation.animate()
- .translationY(0)
- .setDuration(100);
- }
-
- private void toggleFullscreen() {
- final View view = viewBinding.pdfView;
- if (!isFullscreenToggled) {
- getSupportActionBar().hide();
- isFullscreenToggled = true;
- view.setSystemUiVisibility(
- View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
- | View.SYSTEM_UI_FLAG_FULLSCREEN
- | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
- } else {
- getSupportActionBar().show();
- isFullscreenToggled = false;
- view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
- }
- }
-
- void displayFromUri(Uri uri) {
- if (uri == null) {
- setTitle("");
- return;
- }
-
- pdfFileName = getFileName(uri);
- setTitle(pdfFileName);
- setTaskDescription(new ActivityManager.TaskDescription(pdfFileName));
-
- String scheme = uri.getScheme();
- if (scheme != null && scheme.contains("http")) {
- downloadOrShowDownloadedFile(uri);
- } else {
- configurePdfViewAndLoad(viewBinding.pdfView.fromUri(uri));
- }
- }
-
- private void downloadOrShowDownloadedFile(Uri uri) {
- if (downloadedPdfFileContent == null) {
- downloadedPdfFileContent = (byte[]) getLastCustomNonConfigurationInstance();
- }
- if (downloadedPdfFileContent != null) {
- configurePdfViewAndLoad(viewBinding.pdfView.fromBytes(downloadedPdfFileContent));
- } else {
- // we will get the pdf asynchronously with the DownloadPDFFile object
- viewBinding.progressBar.setVisibility(View.VISIBLE);
- DownloadPDFFile downloadPDFFile = new DownloadPDFFile(this);
- downloadPDFFile.execute(uri.toString());
- }
- }
-
- @Override
- public Object onRetainCustomNonConfigurationInstance() {
- return downloadedPdfFileContent;
- }
-
- public void hideProgressBar() {
- viewBinding.progressBar.setVisibility(View.GONE);
- }
-
- void saveToFileAndDisplay(byte[] pdfFileContent) {
- downloadedPdfFileContent = pdfFileContent;
- saveToDownloadFolderIfAllowed(pdfFileContent);
- configurePdfViewAndLoad(viewBinding.pdfView.fromBytes(pdfFileContent));
- }
-
- private void saveToDownloadFolderIfAllowed(byte[] fileContent) {
- if (Utils.canWriteToDownloadFolder(this)) {
- trySaveToDownloadFolder(fileContent, false);
- } else {
- saveToDownloadPermissionLauncher.launch(Manifest.permission.WRITE_EXTERNAL_STORAGE);
- }
- }
-
- private void trySaveToDownloadFolder(byte[] fileContent, boolean showSuccessMessage) {
- try {
- File downloadDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
- Utils.writeBytesToFile(downloadDirectory, pdfFileName, fileContent);
- if (showSuccessMessage) {
- Toast.makeText(this, R.string.saved_to_download, Toast.LENGTH_SHORT).show();
- }
- } catch (IOException e) {
- Log.e(TAG, "Error while saving file to download folder", e);
- Toast.makeText(this, R.string.save_to_download_failed, Toast.LENGTH_SHORT).show();
- }
- }
-
- private void saveDownloadedFileAfterPermissionRequest(boolean isPermissionGranted) {
- if (isPermissionGranted) {
- trySaveToDownloadFolder(downloadedPdfFileContent, true);
- } else {
- Toast.makeText(this, R.string.save_to_download_failed, Toast.LENGTH_SHORT).show();
- }
- }
-
- void navToSettings() {
- settingsLauncher.launch(new Intent(this, SettingsActivity.class));
- }
-
- private void setCurrentPage(int page, int pageCount) {
- pageNumber = page;
- setTitle(String.format("%s %s / %s", pdfFileName + " ", page + 1, pageCount));
- }
-
- public String getFileName(Uri uri) {
- String result = null;
- if (uri.getScheme() != null && uri.getScheme().equals("content")) {
- try (Cursor cursor = getContentResolver().query(uri, null, null, null, null)) {
- if (cursor != null && cursor.moveToFirst()) {
- int indexDisplayName = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
- if (indexDisplayName != -1) {
- result = cursor.getString(indexDisplayName);
- }
- }
- } catch (Exception e) {
- Log.w(TAG, "Couldn't retrieve file name", e);
- }
- }
- if (result == null) {
- result = uri.getLastPathSegment();
- }
- return result;
- }
-
- private void printDocument() {
- mgr.print(pdfFileName, new PdfDocumentAdapter(this, uri), null);
- }
-
- void askForPdfPassword() {
- PasswordDialogBinding dialogBinding = PasswordDialogBinding.inflate(getLayoutInflater());
- AlertDialog alert = new AlertDialog.Builder(this)
- .setTitle(R.string.protected_pdf)
- .setView(dialogBinding.getRoot())
- .setPositiveButton(R.string.ok, (dialog, which) -> {
- pdfPassword = dialogBinding.passwordInput.getText().toString();
- displayFromUri(uri);
- })
- .setIcon(R.drawable.lock_icon)
- .create();
- alert.setCanceledOnTouchOutside(false);
- alert.show();
- }
-
- void showPdfMetaDialog() {
- PdfDocument.Meta meta = viewBinding.pdfView.getDocumentMeta();
- if (meta != null) {
- Bundle dialogArgs = new Bundle();
- dialogArgs.putString(PdfMetaDialog.TITLE_ARGUMENT, meta.getTitle());
- dialogArgs.putString(PdfMetaDialog.AUTHOR_ARGUMENT, meta.getAuthor());
- dialogArgs.putString(PdfMetaDialog.CREATION_DATE_ARGUMENT, meta.getCreationDate());
- DialogFragment dialog = new PdfMetaDialog();
- dialog.setArguments(dialogArgs);
- dialog.show(getSupportFragmentManager(), "meta_dialog");
- }
- }
-
- @Override
- public boolean onCreateOptionsMenu(@NotNull Menu menu) {
- getMenuInflater().inflate(R.menu.menu, menu);
- return true;
- }
-
- @Override
- public boolean onOptionsItemSelected(MenuItem item) {
- switch (item.getItemId()) {
- case R.id.action_about:
- startActivity(Utils.navIntent(this, AboutActivity.class));
- return true;
- case R.id.theme:
- startActivity(Utils.navIntent(getApplicationContext(), CyaneaSettingsActivity.class));
- return true;
- case R.id.settings:
- navToSettings();
- return true;
- default:
- return super.onOptionsItemSelected(item);
- }
- }
-
- public static class PdfMetaDialog extends DialogFragment {
-
- public static final String TITLE_ARGUMENT = "title";
- public static final String AUTHOR_ARGUMENT = "author";
- public static final String CREATION_DATE_ARGUMENT = "creation_date";
-
- @NonNull
- @Override
- public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {
- AlertDialog.Builder builder = new AlertDialog.Builder(requireContext());
- return builder.setTitle(R.string.meta)
- .setMessage(getString(R.string.pdf_title, getArguments().getString(TITLE_ARGUMENT)) + "\n" +
- getString(R.string.pdf_author, getArguments().getString(AUTHOR_ARGUMENT)) + "\n" +
- getString(R.string.pdf_creation_date, getArguments().getString(CREATION_DATE_ARGUMENT)))
- .setPositiveButton(R.string.ok, (dialog, which) -> {})
- .setIcon(R.drawable.info_icon)
- .create();
- }
- }
-}
-
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/MainActivity.kt b/app/src/main/java/com/gsnathan/pdfviewer/MainActivity.kt
new file mode 100644
index 00000000..24cb4a93
--- /dev/null
+++ b/app/src/main/java/com/gsnathan/pdfviewer/MainActivity.kt
@@ -0,0 +1,43 @@
+package com.gsnathan.pdfviewer
+
+import android.os.Bundle
+import androidx.activity.ComponentActivity
+import androidx.activity.compose.setContent
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.Surface
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.tooling.preview.Preview
+import com.gsnathan.pdfviewer.ui.theme.PdfviewerTheme
+
+class MainActivity : ComponentActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContent {
+ PdfviewerTheme {
+ // A surface container using the 'background' color from the theme
+ Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
+ Greeting("Android")
+ }
+ }
+ }
+ }
+}
+
+@Composable
+fun Greeting(name: String, modifier: Modifier = Modifier) {
+ Text(
+ text = "Hello $name!",
+ modifier = modifier
+ )
+}
+
+@Preview(showBackground = true)
+@Composable
+fun GreetingPreview() {
+ PdfviewerTheme {
+ Greeting("Android")
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/MainIntroActivity.java b/app/src/main/java/com/gsnathan/pdfviewer/MainIntroActivity.java
deleted file mode 100755
index 4e68ab71..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/MainIntroActivity.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2018 Gokul Swaminathan
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.gsnathan.pdfviewer;
-
-import android.Manifest;
-import android.graphics.Color;
-import android.os.Build;
-import android.os.Bundle;
-
-import com.github.paolorotolo.appintro.AppIntro;
-import com.github.paolorotolo.appintro.AppIntroFragment;
-import com.github.paolorotolo.appintro.model.SliderPage;
-import com.jaredrummler.cyanea.prefs.CyaneaThemePickerActivity;
-
-import androidx.fragment.app.Fragment;
-
-public class MainIntroActivity extends AppIntro {
-
- int bg = Color.parseColor("#2481a1");
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- getSupportActionBar().hide();
-
- SliderPage first = new SliderPage();
- first.setTitle(getString(R.string.title_intro));
- first.setDescription(getString(R.string.description__intro));
- first.setImageDrawable(R.mipmap.ic_launcher);
- first.setBgColor(bg);
- addSlide(AppIntroFragment.newInstance(first));
-
- SliderPage second = new SliderPage();
- second.setTitle(getString(R.string.title_open));
- second.setDescription(getString(R.string.description_open));
- second.setImageDrawable(R.drawable.opensource_wide);
- second.setBgColor(bg);
- addSlide(AppIntroFragment.newInstance(second));
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
- SliderPage third = new SliderPage();
- third.setTitle(getString(R.string.title_permission));
- third.setDescription(getString(R.string.description__permission));
- third.setImageDrawable(R.drawable.patterns_permissions);
- third.setBgColor(bg);
- addSlide(AppIntroFragment.newInstance(third));
- askForPermissions(new String[]{ Manifest.permission.READ_EXTERNAL_STORAGE }, 3);
- }
-
- showSkipButton(false);
- showStatusBar(false);
- setNavBarColor("#2481a1");
- }
-
- @Override
- public void onDonePressed(Fragment currentFragment) {
- super.onDonePressed(currentFragment);
- finish();
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/PdfDocumentAdapter.java b/app/src/main/java/com/gsnathan/pdfviewer/PdfDocumentAdapter.java
deleted file mode 100644
index 5483bf3f..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/PdfDocumentAdapter.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package com.gsnathan.pdfviewer;
-
-import android.content.Context;
-import android.net.Uri;
-import android.os.Bundle;
-import android.os.CancellationSignal;
-import android.os.ParcelFileDescriptor;
-import android.print.PageRange;
-import android.print.PrintAttributes;
-import android.print.PrintDocumentInfo;
-import android.util.Log;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-class PdfDocumentAdapter extends ThreadedPrintDocumentAdapter {
-
- private final Uri documentUri;
-
- PdfDocumentAdapter(Context ctxt, Uri documentUri) {
- super(ctxt);
- this.documentUri = documentUri;
- }
-
- @Override
- LayoutJob buildLayoutJob(PrintAttributes oldAttributes,
- PrintAttributes newAttributes,
- CancellationSignal cancellationSignal,
- LayoutResultCallback callback, Bundle extras) {
- return new PdfLayoutJob(oldAttributes, newAttributes, cancellationSignal, callback, extras);
- }
-
- @Override
- WriteJob buildWriteJob(PageRange[] pages,
- ParcelFileDescriptor destination,
- CancellationSignal cancellationSignal,
- WriteResultCallback callback, Context ctxt) {
- return new PdfWriteJob(pages, destination, cancellationSignal, callback, ctxt);
- }
-
- private static class PdfLayoutJob extends LayoutJob {
- PdfLayoutJob(PrintAttributes oldAttributes,
- PrintAttributes newAttributes,
- CancellationSignal cancellationSignal,
- LayoutResultCallback callback, Bundle extras) {
- super(oldAttributes, newAttributes, cancellationSignal, callback, extras);
- }
-
- @Override
- public void run() {
- if (cancellationSignal.isCanceled()) {
- callback.onLayoutCancelled();
- } else {
- PrintDocumentInfo.Builder builder = new PrintDocumentInfo.Builder("document.pdf");
-
- builder.setContentType(PrintDocumentInfo.CONTENT_TYPE_DOCUMENT)
- .setPageCount(PrintDocumentInfo.PAGE_COUNT_UNKNOWN)
- .build();
-
- callback.onLayoutFinished(builder.build(), !newAttributes.equals(oldAttributes));
- }
- }
- }
-
- private class PdfWriteJob extends WriteJob {
-
- PdfWriteJob(PageRange[] pages, ParcelFileDescriptor destination,
- CancellationSignal cancellationSignal,
- WriteResultCallback callback, Context ctxt) {
- super(pages, destination, cancellationSignal, callback, ctxt);
- }
-
- @Override
- public void run() {
- InputStream in = null;
- OutputStream out = null;
-
- try {
- in = ctxt.getContentResolver().openInputStream(documentUri);
- out = new FileOutputStream(destination.getFileDescriptor());
-
- byte[] buf = new byte[16384];
- int size;
- while ((size = in.read(buf)) >= 0
- && !cancellationSignal.isCanceled()) {
- out.write(buf, 0, size);
- }
-
- if (cancellationSignal.isCanceled()) {
- callback.onWriteCancelled();
- } else {
- callback.onWriteFinished(new PageRange[] { PageRange.ALL_PAGES });
- }
- } catch (Exception e) {
- callback.onWriteFailed(e.getMessage());
- Log.e(getClass().getSimpleName(), "Exception printing PDF", e);
- } finally {
- try {
- in.close();
- out.close();
- } catch (IOException e) {
- Log.e(getClass().getSimpleName(), "Exception cleaning up from printing PDF", e);
- }
- }
- }
- }
-}
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/SettingsActivity.java b/app/src/main/java/com/gsnathan/pdfviewer/SettingsActivity.java
deleted file mode 100644
index 2a004c5b..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/SettingsActivity.java
+++ /dev/null
@@ -1,93 +0,0 @@
-package com.gsnathan.pdfviewer;
-
-import android.content.ComponentName;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Build;
-import android.os.Bundle;
-import android.preference.Preference;
-import android.util.Log;
-import android.util.TypedValue;
-import android.view.MenuItem;
-import android.view.View;
-
-import androidx.appcompat.app.ActionBar;
-import androidx.appcompat.widget.Toolbar;
-
-import com.jaredrummler.cyanea.app.CyaneaPreferenceActivity;
-
-import org.jetbrains.annotations.Nullable;
-
-import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
-import static android.content.pm.PackageManager.COMPONENT_ENABLED_STATE_ENABLED;
-import static android.content.pm.PackageManager.DONT_KILL_APP;
-import static android.util.TypedValue.COMPLEX_UNIT_DIP;
-
-public class SettingsActivity extends CyaneaPreferenceActivity {
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- setupActionBar();
- addPreferencesFromResource(R.xml.preferences);
- setupShowInLauncherPreference();
- }
-
- private void setupShowInLauncherPreference() {
- Preference showInLauncherPref = findPreference("show_in_launcher");
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
- // Starting from Android Q it is not possible anymore to hide the app from launcher
- // See https://developer.android.com/reference/android/content/pm/LauncherApps#getActivityList(java.lang.String,%20android.os.UserHandle)
- getPreferenceScreen().removePreference(showInLauncherPref);
- } else {
- setOptionsListTopMargin();
- showInLauncherPref.setOnPreferenceChangeListener((preference, newValue) -> {
- try {
- setLauncherAliasState((boolean) newValue);
- return true;
- } catch (Exception ignored) {
- return false;
- }
- });
- }
- }
-
- private void setOptionsListTopMargin() {
- int marginSize = (int) TypedValue.applyDimension(COMPLEX_UNIT_DIP, 10, getResources().getDisplayMetrics());
- View marginView = new View(this);
- marginView.setMinimumHeight(marginSize);
- getListView().addHeaderView(marginView, null, false);
- }
-
- private void setLauncherAliasState(boolean enableAlias) {
- getPackageManager().setComponentEnabledSetting(
- new ComponentName(this, "com.gsnathan.pdfviewer.LauncherAlias"),
- enableAlias ? COMPONENT_ENABLED_STATE_ENABLED : COMPONENT_ENABLED_STATE_DISABLED,
- DONT_KILL_APP
- );
- }
-
- private void setupActionBar() {
- ActionBar actionBar = getSupportActionBar();
- if (actionBar != null)
- actionBar.setDisplayHomeAsUpEnabled(true);
- }
-
- @Override
- public boolean onMenuItemSelected(int featureId, MenuItem item) {
- int id = item.getItemId();
- if (id == android.R.id.home) {
- if (!super.onMenuItemSelected(featureId, item)) {
- onBackPressed();
- }
- return true;
- }
- return super.onMenuItemSelected(featureId, item);
- }
-
- @Override
- public void setSupportActionBar(@Nullable Toolbar toolbar) {
- getDelegate().setSupportActionBar(toolbar);
- }
-}
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/ThreadedPrintDocumentAdapter.java b/app/src/main/java/com/gsnathan/pdfviewer/ThreadedPrintDocumentAdapter.java
deleted file mode 100644
index 1281a2eb..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/ThreadedPrintDocumentAdapter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-package com.gsnathan.pdfviewer;
-
-import android.content.Context;
-import android.os.Bundle;
-import android.os.CancellationSignal;
-import android.os.ParcelFileDescriptor;
-import android.print.PageRange;
-import android.print.PrintAttributes;
-import android.print.PrintDocumentAdapter;
-
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-abstract class ThreadedPrintDocumentAdapter extends PrintDocumentAdapter {
-
- private final Context ctxt;
- private final ExecutorService threadPool = Executors.newFixedThreadPool(1);
-
- ThreadedPrintDocumentAdapter(Context ctxt) {
- this.ctxt = ctxt;
- }
-
- abstract LayoutJob buildLayoutJob(PrintAttributes oldAttributes,
- PrintAttributes newAttributes,
- CancellationSignal cancellationSignal,
- LayoutResultCallback callback,
- Bundle extras);
-
- abstract WriteJob buildWriteJob(PageRange[] pages,
- ParcelFileDescriptor destination,
- CancellationSignal cancellationSignal,
- WriteResultCallback callback,
- Context ctxt);
-
- @Override
- public void onLayout(PrintAttributes oldAttributes,
- PrintAttributes newAttributes,
- CancellationSignal cancellationSignal,
- LayoutResultCallback callback, Bundle extras) {
- threadPool.submit(buildLayoutJob(oldAttributes, newAttributes,
- cancellationSignal, callback, extras));
- }
-
- @Override
- public void onWrite(PageRange[] pages,
- ParcelFileDescriptor destination,
- CancellationSignal cancellationSignal,
- WriteResultCallback callback) {
- threadPool.submit(buildWriteJob(pages, destination, cancellationSignal, callback, ctxt));
- }
-
- @Override
- public void onFinish() {
- threadPool.shutdown();
- super.onFinish();
- }
-
- protected abstract static class LayoutJob implements Runnable {
- PrintAttributes oldAttributes;
- PrintAttributes newAttributes;
- CancellationSignal cancellationSignal;
- LayoutResultCallback callback;
- Bundle extras;
-
- LayoutJob(PrintAttributes oldAttributes,
- PrintAttributes newAttributes,
- CancellationSignal cancellationSignal,
- LayoutResultCallback callback, Bundle extras) {
- this.oldAttributes = oldAttributes;
- this.newAttributes = newAttributes;
- this.cancellationSignal = cancellationSignal;
- this.callback = callback;
- this.extras = extras;
- }
- }
-
- protected abstract static class WriteJob implements Runnable {
- PageRange[] pages;
- ParcelFileDescriptor destination;
- CancellationSignal cancellationSignal;
- WriteResultCallback callback;
- Context ctxt;
-
- WriteJob(PageRange[] pages, ParcelFileDescriptor destination,
- CancellationSignal cancellationSignal,
- WriteResultCallback callback, Context ctxt) {
- this.pages = pages;
- this.destination = destination;
- this.cancellationSignal = cancellationSignal;
- this.callback = callback;
- this.ctxt = ctxt;
- }
- }
-}
-
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/Utils.java b/app/src/main/java/com/gsnathan/pdfviewer/Utils.java
deleted file mode 100755
index c4228987..00000000
--- a/app/src/main/java/com/gsnathan/pdfviewer/Utils.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * MIT License
- *
- * Copyright (c) 2018 Gokul Swaminathan
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
-package com.gsnathan.pdfviewer;
-
-import android.content.ClipData;
-import android.Manifest;
-import android.content.Context;
-import android.content.Intent;
-import android.content.pm.PackageManager;
-import android.graphics.Color;
-import android.net.Uri;
-import android.os.Build;
-
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.core.content.ContextCompat;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import io.github.tonnyl.whatsnew.WhatsNew;
-import io.github.tonnyl.whatsnew.item.WhatsNewItem;
-
-public class Utils {
-
- static void showLog(AppCompatActivity context) {
- WhatsNew log = WhatsNew.newInstance(
- new WhatsNewItem("Full screen mode", "A new button has been added to the bottom bar to read PDFs in full screen!", R.drawable.star_icon),
- new WhatsNewItem("Keep the screen on while reading", "You can enable this feature in Settings.", R.drawable.star_icon),
- new WhatsNewItem("Sharing improvements and fixes", "Including better support for third-party share dialogs.", R.drawable.star_icon),
- new WhatsNewItem("Bugs", "A bunch of bug fixes and robustness improvements.", R.drawable.star_icon)
- );
- log.setTitleColor(Color.BLACK);
- log.setTitleText(context.getResources().getString(R.string.appChangelog));
- log.setButtonText(context.getResources().getString(R.string.buttonLog));
- log.setButtonBackground(ContextCompat.getColor(context, R.color.colorPrimary));
- log.setButtonTextColor(Color.WHITE);
- log.setItemTitleColor(Color.parseColor("#339999")); // same as icons
- log.setItemContentColor(Color.parseColor("#808080"));
-
- log.show(context.getSupportFragmentManager(), "Log");
- }
-
- static Intent emailIntent(String emailAddress, String subject, String text) {
- Intent email = new Intent(Intent.ACTION_SENDTO);
- email.setData(Uri.parse("mailto:" + emailAddress));
- email.putExtra(Intent.EXTRA_SUBJECT, subject);
- email.putExtra(Intent.EXTRA_TEXT, text);
- return email;
- }
-
- static Intent plainTextShareIntent(String chooserTitle, String text) {
- Intent intent = new Intent(Intent.ACTION_SEND);
- intent.setType("text/plain");
- intent.putExtra(Intent.EXTRA_TEXT, text);
- return Intent.createChooser(intent, chooserTitle);
- }
-
- static Intent fileShareIntent(String chooserTitle, String fileName, Uri fileUri) {
- Intent intent = new Intent(Intent.ACTION_SEND);
- intent.setType("application/pdf");
- intent.putExtra(Intent.EXTRA_STREAM, fileUri);
- intent.setClipData(new ClipData(fileName, new String[] { "application/pdf" }, new ClipData.Item(fileUri)));
- intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
- return Intent.createChooser(intent, chooserTitle);
- }
-
- static Intent linkIntent(String url) {
- Intent link = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
- return link;
- }
-
- static Intent navIntent(Context context, Class activity) {
- Intent navigate = new Intent(context, activity);
- return navigate;
- }
-
- static String getAppVersion() {
- return BuildConfig.VERSION_NAME;
- }
-
- static boolean canWriteToDownloadFolder(Context context) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
- return true;
-
- return ContextCompat.checkSelfPermission(context, Manifest.permission.WRITE_EXTERNAL_STORAGE)
- == PackageManager.PERMISSION_GRANTED;
- }
-
- static byte[] readBytesToEnd(InputStream inputStream) throws IOException {
- ByteArrayOutputStream output = new ByteArrayOutputStream();
- byte[] buffer = new byte[8 * 1024];
- int bytesRead;
- while ((bytesRead = inputStream.read(buffer)) != -1) {
- output.write(buffer, 0, bytesRead);
- }
- return output.toByteArray();
- }
-
- static void writeBytesToFile(File directory, String fileName, byte[] fileContent) throws IOException {
- File file = new File(directory, fileName);
- try (FileOutputStream stream = new FileOutputStream(file)) {
- stream.write(fileContent);
- }
- }
-}
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Color.kt b/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Color.kt
new file mode 100644
index 00000000..c412c97a
--- /dev/null
+++ b/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Color.kt
@@ -0,0 +1,11 @@
+package com.gsnathan.pdfviewer.ui.theme
+
+import androidx.compose.ui.graphics.Color
+
+val Purple80 = Color(0xFFD0BCFF)
+val PurpleGrey80 = Color(0xFFCCC2DC)
+val Pink80 = Color(0xFFEFB8C8)
+
+val Purple40 = Color(0xFF6650a4)
+val PurpleGrey40 = Color(0xFF625b71)
+val Pink40 = Color(0xFF7D5260)
\ No newline at end of file
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Theme.kt b/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Theme.kt
new file mode 100644
index 00000000..087e1746
--- /dev/null
+++ b/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Theme.kt
@@ -0,0 +1,70 @@
+package com.gsnathan.pdfviewer.ui.theme
+
+import android.app.Activity
+import android.os.Build
+import androidx.compose.foundation.isSystemInDarkTheme
+import androidx.compose.material3.MaterialTheme
+import androidx.compose.material3.darkColorScheme
+import androidx.compose.material3.dynamicDarkColorScheme
+import androidx.compose.material3.dynamicLightColorScheme
+import androidx.compose.material3.lightColorScheme
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.SideEffect
+import androidx.compose.ui.graphics.toArgb
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.platform.LocalView
+import androidx.core.view.WindowCompat
+
+private val DarkColorScheme = darkColorScheme(
+ primary = Purple80,
+ secondary = PurpleGrey80,
+ tertiary = Pink80
+)
+
+private val LightColorScheme = lightColorScheme(
+ primary = Purple40,
+ secondary = PurpleGrey40,
+ tertiary = Pink40
+
+ /* Other default colors to override
+ background = Color(0xFFFFFBFE),
+ surface = Color(0xFFFFFBFE),
+ onPrimary = Color.White,
+ onSecondary = Color.White,
+ onTertiary = Color.White,
+ onBackground = Color(0xFF1C1B1F),
+ onSurface = Color(0xFF1C1B1F),
+ */
+)
+
+@Composable
+fun PdfviewerTheme(
+ darkTheme: Boolean = isSystemInDarkTheme(),
+ // Dynamic color is available on Android 12+
+ dynamicColor: Boolean = true,
+ content: @Composable () -> Unit
+) {
+ val colorScheme = when {
+ dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
+ val context = LocalContext.current
+ if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
+ }
+
+ darkTheme -> DarkColorScheme
+ else -> LightColorScheme
+ }
+ val view = LocalView.current
+ if (!view.isInEditMode) {
+ SideEffect {
+ val window = (view.context as Activity).window
+ window.statusBarColor = colorScheme.primary.toArgb()
+ WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme
+ }
+ }
+
+ MaterialTheme(
+ colorScheme = colorScheme,
+ typography = Typography,
+ content = content
+ )
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Type.kt b/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Type.kt
new file mode 100644
index 00000000..5a5c90e1
--- /dev/null
+++ b/app/src/main/java/com/gsnathan/pdfviewer/ui/theme/Type.kt
@@ -0,0 +1,34 @@
+package com.gsnathan.pdfviewer.ui.theme
+
+import androidx.compose.material3.Typography
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.unit.sp
+
+// Set of Material typography styles to start with
+val Typography = Typography(
+ bodyLarge = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Normal,
+ fontSize = 16.sp,
+ lineHeight = 24.sp,
+ letterSpacing = 0.5.sp
+ )
+ /* Other default text styles to override
+ titleLarge = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Normal,
+ fontSize = 22.sp,
+ lineHeight = 28.sp,
+ letterSpacing = 0.sp
+ ),
+ labelSmall = TextStyle(
+ fontFamily = FontFamily.Default,
+ fontWeight = FontWeight.Medium,
+ fontSize = 11.sp,
+ lineHeight = 16.sp,
+ letterSpacing = 0.5.sp
+ )
+ */
+)
\ No newline at end of file
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
old mode 100755
new mode 100644
index c7bd21db..2b068d11
--- a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -2,19 +2,15 @@
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
- android:viewportHeight="108"
- android:viewportWidth="108">
-
+ android:viewportWidth="108"
+ android:viewportHeight="108">
+
-
+ android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
+ android:strokeWidth="1"
+ android:strokeColor="#00000000" />
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/alert_icon.xml b/app/src/main/res/drawable/alert_icon.xml
deleted file mode 100755
index 8663b273..00000000
--- a/app/src/main/res/drawable/alert_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/appbar_back.xml b/app/src/main/res/drawable/appbar_back.xml
deleted file mode 100644
index 597d7ee3..00000000
--- a/app/src/main/res/drawable/appbar_back.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/code_icon.xml b/app/src/main/res/drawable/code_icon.xml
deleted file mode 100755
index a6ac2cc6..00000000
--- a/app/src/main/res/drawable/code_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/email_icon.xml b/app/src/main/res/drawable/email_icon.xml
deleted file mode 100755
index e913c0c5..00000000
--- a/app/src/main/res/drawable/email_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/folder_icon.xml b/app/src/main/res/drawable/folder_icon.xml
deleted file mode 100755
index dd4fed3a..00000000
--- a/app/src/main/res/drawable/folder_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/fullscreen_icon.xml b/app/src/main/res/drawable/fullscreen_icon.xml
deleted file mode 100644
index eb7b25a7..00000000
--- a/app/src/main/res/drawable/fullscreen_icon.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
diff --git a/app/src/main/res/drawable/github_icon.xml b/app/src/main/res/drawable/github_icon.xml
deleted file mode 100755
index 34c2eb6a..00000000
--- a/app/src/main/res/drawable/github_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 00000000..07d5da9c
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/info_icon.xml b/app/src/main/res/drawable/info_icon.xml
deleted file mode 100755
index 8ab55397..00000000
--- a/app/src/main/res/drawable/info_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/lib_icon.xml b/app/src/main/res/drawable/lib_icon.xml
deleted file mode 100755
index 85d9e1ac..00000000
--- a/app/src/main/res/drawable/lib_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/license_icon.xml b/app/src/main/res/drawable/license_icon.xml
deleted file mode 100755
index ac00e2eb..00000000
--- a/app/src/main/res/drawable/license_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/lock_icon.xml b/app/src/main/res/drawable/lock_icon.xml
deleted file mode 100644
index 94f568ff..00000000
--- a/app/src/main/res/drawable/lock_icon.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/log_icon.xml b/app/src/main/res/drawable/log_icon.xml
deleted file mode 100755
index 63f31235..00000000
--- a/app/src/main/res/drawable/log_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/meta_info.xml b/app/src/main/res/drawable/meta_info.xml
deleted file mode 100644
index cc770dd2..00000000
--- a/app/src/main/res/drawable/meta_info.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/opensource_wide.png b/app/src/main/res/drawable/opensource_wide.png
deleted file mode 100755
index 0f72fa5a..00000000
Binary files a/app/src/main/res/drawable/opensource_wide.png and /dev/null differ
diff --git a/app/src/main/res/drawable/patterns_permissions.png b/app/src/main/res/drawable/patterns_permissions.png
deleted file mode 100755
index a59c7f17..00000000
Binary files a/app/src/main/res/drawable/patterns_permissions.png and /dev/null differ
diff --git a/app/src/main/res/drawable/print_icon.xml b/app/src/main/res/drawable/print_icon.xml
deleted file mode 100755
index b5abab24..00000000
--- a/app/src/main/res/drawable/print_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/privacy_icon.xml b/app/src/main/res/drawable/privacy_icon.xml
deleted file mode 100755
index de088403..00000000
--- a/app/src/main/res/drawable/privacy_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/replay_icon.xml b/app/src/main/res/drawable/replay_icon.xml
deleted file mode 100755
index 1970502f..00000000
--- a/app/src/main/res/drawable/replay_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/share_icon.xml b/app/src/main/res/drawable/share_icon.xml
deleted file mode 100755
index 8d1048eb..00000000
--- a/app/src/main/res/drawable/share_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/star_icon.xml b/app/src/main/res/drawable/star_icon.xml
deleted file mode 100644
index 71597dc4..00000000
--- a/app/src/main/res/drawable/star_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/thumbs_icon.xml b/app/src/main/res/drawable/thumbs_icon.xml
deleted file mode 100644
index 6730774f..00000000
--- a/app/src/main/res/drawable/thumbs_icon.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/font/roboto_medium.ttf b/app/src/main/res/font/roboto_medium.ttf
deleted file mode 100644
index 39c63d74..00000000
Binary files a/app/src/main/res/font/roboto_medium.ttf and /dev/null differ
diff --git a/app/src/main/res/font/roboto_regular.ttf b/app/src/main/res/font/roboto_regular.ttf
deleted file mode 100644
index 8c082c8d..00000000
Binary files a/app/src/main/res/font/roboto_regular.ttf and /dev/null differ
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml
deleted file mode 100755
index e20f285d..00000000
--- a/app/src/main/res/layout/activity_about.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
deleted file mode 100755
index 3a3a8c09..00000000
--- a/app/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/password_dialog.xml b/app/src/main/res/layout/password_dialog.xml
deleted file mode 100644
index 8ac895ed..00000000
--- a/app/src/main/res/layout/password_dialog.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/menu/fab_menu.xml b/app/src/main/res/menu/fab_menu.xml
deleted file mode 100644
index ffb1b1cf..00000000
--- a/app/src/main/res/menu/fab_menu.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
diff --git a/app/src/main/res/menu/menu.xml b/app/src/main/res/menu/menu.xml
deleted file mode 100755
index 9005768f..00000000
--- a/app/src/main/res/menu/menu.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
old mode 100755
new mode 100644
index 4ae7d123..6f3b755b
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,6 @@
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
old mode 100755
new mode 100644
index 4ae7d123..6f3b755b
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,6 @@
-
-
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100755
index 63bcfbb9..00000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 00000000..c209e78e
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
deleted file mode 100755
index 774dd690..00000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_background.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
deleted file mode 100755
index b7ddac15..00000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
deleted file mode 100755
index 63bcfbb9..00000000
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..b2dfe3d1
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100755
index 3dfe264f..00000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 00000000..4f0f1d64
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
deleted file mode 100755
index 760c236a..00000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_background.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
deleted file mode 100755
index d7f695eb..00000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
deleted file mode 100755
index 3dfe264f..00000000
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..62b611da
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100755
index c8786f47..00000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 00000000..948a3070
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
deleted file mode 100755
index 4c53fbe0..00000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
deleted file mode 100755
index 9cd19c44..00000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
deleted file mode 100755
index c8786f47..00000000
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..1b9a6956
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100755
index 4ae1668f..00000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..28d4b77f
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
deleted file mode 100755
index 79b63e6e..00000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
deleted file mode 100755
index d47982a9..00000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
deleted file mode 100755
index 4ae1668f..00000000
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..9287f508
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100755
index d681df4b..00000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 00000000..aa7d6427
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
deleted file mode 100755
index 25e43c6e..00000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
deleted file mode 100755
index 4ac6c48a..00000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
deleted file mode 100755
index d681df4b..00000000
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 00000000..9126ae37
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
deleted file mode 100644
index d6085d5d..00000000
--- a/app/src/main/res/values-cs/strings.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-
-
-
- Pdf Viewer Plus
- Otevřít soubor
- Soubor se nepodařilo otevřít. Zkontrolujte stav souborového manažeru.
- O Programu
- Verze
- Přehrát Úvod
- Gokul Swaminathan
- Email
- Tato aplikace je samozřejmě otevřeným softwarem. Máte vždy možnost vytvořit vlastní úpravy této aplikace. Odkaz na zdrojový kód je v sekci O Programu.
- Otevřenost
- Pdf Viewer Plus
- Jednoduchý prohlížeč Pdf dokumentů.
- Licence
- Ochrana Soukromí
-
-
- MIT License\n\nCopyright (©) 2018 Gokul Swaminathan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-
- Změnové záznamy
- Ok
- Oprávnění k úložišti
-
- Použité otevřené knihovny
- Github
- Zdrojový kód
-
- Sdílet soubor
- Tisk souboru
- Poznámky vývojáře
- Změnit vzhled
- Informace o aplikaci
- Informace o autorovi
- Přispěvatelé
-
- Zvolit vzhled
-
- Témata vzhledu
- Zvolit z předinstalovaných témat
-
- Barva primární
- Zobrazena v aplikaci nejvíce.
-
- Barva zvýraznění
- Zvýrazňuje vybrané části rozhraní.
-
- Barva pozadí
- Barva na pozadí.
- Vzhled
-
- Barva navigační lišty
- Primární barva navigační lišty
- Informace o souboru
- Vysoká kvalita vykreslování
- Nastavení
- Vyhlazování
- Vodorovné posouvání
- Page Snap
- Doskok stránky
- Kvalita
- Pohyb v dokumentu
- Nastavení
- Pokračovat
-
-
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
deleted file mode 100644
index dc301a16..00000000
--- a/app/src/main/res/values-de/strings.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
- Datei auswählen
- Datei konnte nicht ausgewählt werden. Bitte überprüfen Sie Ihren Dateimanager.
- Der Server antwortete mit einem Fehler.
- Diese Datei konnte nicht heruntergeladen werden.
- Fehler: Gesicherte Verbindung fehlgeschlagen.
- Datei im Download Ordner gespeichert.
- Datei konnte nicht im Download Ordner gespeichert werden.
- Über
- Version
- Einführung wiederholen
- E-Mail
- Diese App ist natürlich quelloffen (open source). Sie können gerne Ihre eigenen Modifikationen an der App vornehmen. Den Link zum Quellcode finden Sie im Bereich Über.
- Freiheit
- Ein einfacher Dokumentenbetrachter für Pdf-Dateien.
- Lizenz
- Datenschutz-Bestimmungen
-
- Änderungshistorie
- Ok
- Speicherberechtigungen
-
- Open Source-Bibliotheken
- Quellcode
-
- Datei teilen
- Datei drucken
- Vollbild
- Hinweise vom Entwickler
- Thema ändern
- App-Info
- Autor-Info
- Mitwirkende
-
- Themenauswahl
-
- Themen
- Vorinstalliertes Thema auswählen
-
- Hauptfarbe
- Wird überwiegend in der App verwendet.
-
- Akzentfarbe
- Hebt ausgewählten Bereich der Benutzeroberfläche hervor.
-
- Hintergrundfarbe
- Farbe für den Hintergrund des App-Inhaltes
- Erscheinungsbild
-
- Farbe der Navigationsleiste
- Hauptfarbe auf die Navigationsleiste anwenden
- Dateiinfo
- Wiedergabe in hoher Qualität
- Einstellungen
- Kantenglättung
- Horizontales Scrollen
- Seite einrasten
- Ansicht nach jedem Wischen auf die aktuelle Seite zentrieren
- Seitenumbruch
- Schnell wischen, um direkt auf die nächste Seite zu springen
- Qualität
- Scrollen
- Einstellungen
- Weiter
- App im Launcher anzeigen
- Möglicherweise müssen Sie Ihren Launcher neu starten, damit diese Option wirksam wird
- Titel: %1$s
- Autor: %1$s
- Erstellungsdatum: %1$s
-
- Beim Öffnen der Datei trat ein Fehler auf.
- Geschütztes PDF
- Geben Sie das korrekte Passwort ein, um das Dokument zu öffnen:
- Falsches Passwort.
-
- Dunkles Thema für PDF
-
diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml
deleted file mode 100644
index 7887647c..00000000
--- a/app/src/main/res/values-es-rES/strings.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
- Pdf Viewer Plus
- Abrir
- No se pudo abrir el archivo, verifique el estado del administrador de archivos.
- El servidor remoto respondió con un error.
- Por alguna razón, no se pudo descargar este archivo.
- Conexión segura fallida.
- Archivo guardado a la carpeta de descargas.
- No se pudo guardar el archivo a la carpeta de descargas.
- Acerca de
- Versión
- Repetir introducción
- Gokul Swaminathan
- Email
- Por supuesto, esta aplicación es de código abierto. Usted siempre tiene el privilegio de realizar sus propias modificaciones a esta aplicación. El enlace del código fuente se encuentra en la sección Acerca de.
- Libre
- Pdf Viewer Plus
- Un visor de documentos PDF simple.
- Licencia
- Política de privacidad
-
-
- MIT License\n\nCopyright (©) 2018 Gokul Swaminathan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-
- Registro de cambios
- Ok
- Permisos de almacenamiento
-
- Librerías de código abierto
- Github
- Código fuente
-
- Compartir
- Imprimir
- Aviso del desarrollador
- Cambiar tema
- Información de la aplicación
- Información del autor
- Colaboradores
-
- Selector de temas
-
- Temas
- Selecciona un tema preinstalado
-
- Color primario
- El color más común de la interfaz.
-
- Color de acentuación
- Acentúa algunas partes de la interfaz.
-
- Color de fondo
- El color de fondo de la interfaz.
- Apariencia
-
- Color de la barra de navegación
- Aplica el color primario a la barra de navegación.
- Información
- Renderizado de alta calidad
- Configuración
- Anti-Aliasing
- Deslizamiento horizontal
- Ajuste de página
- Centra la vista en la página actual después de cada deslizamiento
- Salto de página
- Realiza un deslizamiento rápido para saltar a la siguiente página
- Calidad
- Deslizamiento
- Configuración
- Continuar
- Mostrar aplicación en su lanzador de aplicaciones
- Puede que necesite reiniciar su lanzador para que esta opción se aplique
- Título: %1$s
- Autor: %1$s
- Fecha de creación: %1$s
-
\ No newline at end of file
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
deleted file mode 100644
index b1681640..00000000
--- a/app/src/main/res/values-fr/strings.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
- Choisir un fichier
- Impossible de choisir un fichier. Vérifiez dans le navigateur de fichier.
- Erreur de chargement de la page, http error code :
- Nous ne pouvons pas télécharger ce fichier pour plusieurs raisons.
- Échec de la connexion sécurisée.
- Fichier sauvegardé dans le dossier Téléchargements
- Impossible de sauvegarder le fichier dans le dossier Téléchargements.
- À propos
- Version
- Repasser l\'intro
- Courriel
- Cette application est bien entendu open source. Vous avez toujours la permission d\'apporter vos propres modifications à cette application. Le lien vers le code source est dans la section À propos.
- Liberté
- Un lecteur PDF simple.
- Licence
- Politique de confidentialité
- Journal des modifications
- Ok
- Autorisation de stockage
- Bibliothèques Open Source
- Code Source
- Partager le fichier
- Imprimer le fichier
- Note du développeur
- Changer de thème
- Info sur l\'app
- Info sur l\'auteur
- Contributeurs
- Navigateur de thèmes
- Thèmes
- Choisir un thème pré-installé
- Couleur principale
- Affichée la plus fréquemment dans votre application.
- Couleur d\'accentuation
- Parties accentuées de l\'interface.
- Couleur d\'arrière-plan
- Couleur du fond du contenu de l\'application.
- Apparence
- Couleur de la barre de navigation
- Appliquer la couleur principale à la barre de navigation
- Info sur le fichier
- Rendu en haute qualité
- Préférences
- Anticrénelage
- Défilement horizontal
- Saut de page
- Centrer la vue sur la page actuelle après chaque balayage
- Saut de page
- Effectuer un balayage rapide pour passer directement à la page suivante
- Qualité
- Défilement
- Préférences
- Continuer
- Afficher l\'application dans le lanceur
- Vous devrez peut-être redémarrer votre lanceur pour que cette option prenne effet
- Titre : %1$s
- Auteur : %1$s
- Date de création : %1$s
-
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
deleted file mode 100644
index 4a0e4518..00000000
--- a/app/src/main/res/values-it/strings.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
- Apri file
- Impossibile aprire il file. Controlla lo stato del gestore di file.
- Il server remoto ha risposto con un errore.
- Per qualche motivo non è stato possibile scaricare il file.
- Connessione sicura fallita.
- Il file è stato salvato nella cartella dei download.
- Non è stato possibile salvare il file nella cartella dei download.
- Informazioni su…
- Versione
- Ripeti l\'introduzione
- Email
- Ovviamente quest\'app è open source. Puoi dare il tuo contributo quando vuoi. Il link al codice sorgente è nella sezione Informazioni.
- Libertà
- Un semplice visualizzatore di documenti PDF.
- Licenza
- Informativa sulla privacy
-
- Novità
- Ok
- Permessi di archiviazione
- Ora ti verrà richiesto di consentire all\'app di accedere alla memoria del telefono. Senza quest\'autorizzazione, l\'app potrebbe non riuscire ad aprire i file in alcuni casi.
-
- Librerie open source
- Codice sorgente
-
- Condividi file
- Stampa file
- Avviso dello sviluppatore
- Cambia tema
- Informazioni sull\'app
- Informazioni sull\'autore
- Collaboratori
-
- Selettore del tema
-
- Temi
- Scegli un tema preinstallato
-
- Colore primario
- Il colore principale dell\'app.
-
- Colore secondario
- Mette in risalto alcune parti dell\'interfaccia.
-
- Colore di sfondo
- Il colore sottostante al contenuto dell\'app.
- Aspetto
-
- Colore della barra di navigazione
- Applica il colore primario alla barra di navigazione
- Informazioni sul file
- Rendering di alta qualità
- Impostazioni
- Anti-aliasing
- Scorrimento orizzontale
- Mantieni visuale centrata
- Centra la visuale sulla pagina corrente dopo ogni scorrimento
- Scorrimento rapido
- Passa direttamente alla pagina successiva con uno scorrimento rapido
- Visualizzazione
- Scorrimento
- Impostazioni
- Continua
- Mostra l\'applicazione nel launcher
- Potrebbe essere necessario riavviare il launcher affinché la modifica abbia effetto
- Titolo: %1$s
- Autore: %1$s
- Data di creazione: %1$s
- Si è verificato un errore durante l\'apertura del file.
- PDF protetto
- Inserisci la password corretta per aprire il documento:
- Password errata.
- Modalità scura per il PDF
- Mantieni lo schermo acceso
- Questa app non raccoglie alcun dato.\nI seguenti permessi sono richiesti per fornire specifiche funzionalità dell\'applicazione:\n- Internet: aprire i PDF tramite link\n- Archiviazione: aprire file dalla memoria interna, salvare i PDF aperti tramite link
-
\ No newline at end of file
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
deleted file mode 100644
index a1e900d5..00000000
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-
-
-
- Pdf Viewer Plus
- Selecionar arquivo
- Não foi possível selecionar um arquivo. Verifique o status do gerenciador de arquivos.
- Falha na conexão segura.
- Sobre
- Versão
- Repetir introdução
- Gokul Swaminathan
- E-mail
- É claro que este app tem o código aberto. Você sempre tem o privilégio de fazer suas próprias modificações nele. O link do código fonte está na seção Sobre.
- Liberdade
- Pdf Viewer Plus
- Um simples visualizador de documentos PDF
- Licença
- Política de privacidade
-
-
- MIT License\n\nCopyright (©) 2018 Gokul Swaminathan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-
- Registro de mudanças
- Ok
- Permissão de armazenamento
-
- Bibliotecas de código aberto
- Github
- Código fonte
-
- Compartilhar arquivo
- Imprimir arquivo
- Notícia do desenvolvedor
- Mudar tema
- Informações do app
- Informações do autor
- Contribuidores
-
- Seletor de temas
-
- Temas
- Selecione um tema pré-instalado
-
- Cor primária
- Exibida com mais frequência no seu aplicativo.
-
- Cor de destaque
- Destaca certas partes da interface.
-
- Cor de fundo
- A cor de fundo do conteúdo do aplicativo.
- Aparência
-
- Cor da barra de navegação
- Aplicar a cor primária à barra de navegação
- Informações do arquivo
- Renderização em alta qualidade
- Configurações
- Anti-Aliasing
- Rolagem horizontal
- Page Snap
- Page Fling
- Qualidade
- Rolagem
- Configurações
- Continuar
-
-
diff --git a/app/src/main/res/values-ru-rRU/strings.xml b/app/src/main/res/values-ru-rRU/strings.xml
deleted file mode 100644
index 767397dd..00000000
--- a/app/src/main/res/values-ru-rRU/strings.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
- Простое приложение для просмотра PDF документов.
- Свобода действий
- Это приложение с открытым исходным кодом. Вы можете вносить свои изменения в приложение. Ссылка на исходный код находится в разделе «О программе».
- Разрешения
-
-
- Выбрать файл
- Невозможно выбрать файл. Проверьте ваш файловый менеджер.
- Не удалось установить защищённое соединение.
- Поделиться
- Информация о файле
- Печать
-
-
- Изменить тему
- Внешний вид
- Темы
- Выбор темы
- Выберите предустановленную тему
- Основной цвет
- Чаще всего отображается в вашем приложении.
- Accent color
- Подсвечивает выделенную область пользовательского интерфейса.
- Цвет фона
- Цвет для фона содержимого приложения
- Цвет панели навигации
- Применить основной цвет к панели навигации
-
-
- Настройки
- Настройки
- Качество
- Высокое качество изображения
- Сглаживание
- Прокрутка
- Горизонтальная прокрутка
- Перелистывание страниц
-
-
- О приложении
- Информация о приложении
- Повтор введения
- Журнал изменений
- Продолжить
- Лицензия
- Политика конфиденциальности
- Исходный код
- Библиотеки с исходным кодом
- Об авторе
- E-Mail
- Авторы
-
- ОК
- Версия
- Уведомление разработчика
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
old mode 100755
new mode 100644
index 911d0053..f8c6127d
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,35 +1,10 @@
-
-
- #2481a1
- #2481a1
- #00cc99
- #ffffff
-
-
- #2481a1
- #00cc99
-
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 32b3c5e4..346e8287 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1,125 +1,3 @@
-
-
- Pdf Viewer Plus
- Pick File
- Unable to pick file. Check status of file manager.
- Remote server responded with an error.
- We couldn\'t download this file for some reason.
- Secure connection failed.
- File saved to Download folder.
- Couldn\'t save file to Download folder.
- About
- Version
- Replay Intro
- Gokul Swaminathan
- Email
- Of course this app is open source. You always have the privilege to make your own modifications to this app. The source code link is in the about section.
- Freedom
- Pdf Viewer Plus
- A simple Pdf document viewer.
- License
- Privacy Policy
-
-
- MIT License\n\nCopyright (©) 2018 Gokul Swaminathan\n\nPermission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
-
- Change Log
- Ok
- Storage Permissions
- You will now be prompted to allow the app to access the phone\'s storage. Without this permission, documents might fail to open in some cases.
-
- Open Source Libraries
- Github
- Source Code
-
- Share File
- Print File
- Full Screen
- Developer Notice
- Change Theme
- App Info
- Author Info
- Contributors
-
- Theme Picker
-
- Themes
- Select a pre-installed theme
-
- Primary color
- Displayed most frequently across your app.
-
- Accent color
- Accents select parts of the UI.
-
- Background color
- The underlying color of the app’s content.
- Appearance
-
- Navigation bar color
- Apply the primary color to the navigation bar
- File Info
- High Quality Rendering
- Settings
- Anti-Aliasing
- Horizontal Scrolling
- Page Snap
- Center the view on the current page after each swipe
- Page Fling
- Perform a quick swipe to jump directly to the next page
- Visual
- Scrolling
- Settings
- Continue
- Show app in launcher
- You may need to restart your launcher for this option to take effect
- Title: %1$s
- Author: %1$s
- Creation Date: %1$s
-
- An error occurred while opening the file.
- Protected PDF
- Enter the correct password to open the document:
- Wrong password.
-
-
- Dark theme for PDF
- Keep the screen on
- This app does not collect any data.\nThe following permissions are required to provide specific features in the app:\n- Internet: open PDFs through links\n- Storage: open files from storage, save PDFs opened through links
+ Pdfviewer
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
new file mode 100644
index 00000000..e13fb1ea
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/backup_rules.xml b/app/src/main/res/xml/backup_rules.xml
new file mode 100644
index 00000000..fa0f996d
--- /dev/null
+++ b/app/src/main/res/xml/backup_rules.xml
@@ -0,0 +1,13 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml
new file mode 100644
index 00000000..9ee9997b
--- /dev/null
+++ b/app/src/main/res/xml/data_extraction_rules.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
deleted file mode 100644
index fa19ec78..00000000
--- a/app/src/main/res/xml/preferences.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/test/java/com/gsnathan/pdfviewer/ExampleUnitTest.kt b/app/src/test/java/com/gsnathan/pdfviewer/ExampleUnitTest.kt
new file mode 100644
index 00000000..c90568dd
--- /dev/null
+++ b/app/src/test/java/com/gsnathan/pdfviewer/ExampleUnitTest.kt
@@ -0,0 +1,17 @@
+package com.gsnathan.pdfviewer
+
+import org.junit.Test
+
+import org.junit.Assert.*
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * See [testing documentation](http://d.android.com/tools/testing).
+ */
+class ExampleUnitTest {
+ @Test
+ fun addition_isCorrect() {
+ assertEquals(4, 2 + 2)
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
old mode 100755
new mode 100644
index 1971eb58..43143137
--- a/build.gradle
+++ b/build.gradle
@@ -1,52 +1,6 @@
-/*
- * MIT License
- *
- * Copyright (c) 2018 Gokul Swaminathan
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
-
-buildscript {
-
- repositories {
- google()
- jcenter()
- maven { url "https://maven.google.com" }
- }
- dependencies {
- classpath 'com.android.tools.build:gradle:4.1.2'
-
- // NOTE: Do not place your application dependencies here; they belong
- // in the individual module build.gradle files
- }
-}
-
-allprojects {
- repositories {
- maven { url "https://jitpack.io" }
- google()
- jcenter()
- }
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
+plugins {
+ id 'com.android.application' version '8.0.2' apply false
+ id 'com.android.library' version '8.0.2' apply false
+ id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
+}
\ No newline at end of file
diff --git a/fastlane/metadata/android/en-US/changelogs/28.txt b/fastlane/metadata/android/en-US/changelogs/28.txt
deleted file mode 100644
index fd52fcdb..00000000
--- a/fastlane/metadata/android/en-US/changelogs/28.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-- Added full screen mode
-- Added a new option to keep the screen on while reading
-- Sharing improvements and fixes
-- Miscellaneous bug fixes and robustness improvements
diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt
deleted file mode 100644
index 0ed80fd8..00000000
--- a/fastlane/metadata/android/en-US/full_description.txt
+++ /dev/null
@@ -1 +0,0 @@
-Pdf Viewer Plus is a smooth PDF viewer written in Java. It contains a simple user interface, multiple themes, and the ability to share a PDF.
diff --git a/fastlane/metadata/android/en-US/images/featureGraphic.png b/fastlane/metadata/android/en-US/images/featureGraphic.png
deleted file mode 100755
index 24d5f0bd..00000000
Binary files a/fastlane/metadata/android/en-US/images/featureGraphic.png and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/icon.png b/fastlane/metadata/android/en-US/images/icon.png
deleted file mode 100755
index 0cb3c4ae..00000000
Binary files a/fastlane/metadata/android/en-US/images/icon.png and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
deleted file mode 100644
index 6655b4b5..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png
deleted file mode 100644
index 784589e7..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png b/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png
deleted file mode 100644
index e219506b..00000000
Binary files a/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png and /dev/null differ
diff --git a/fastlane/metadata/android/en-US/short_description.txt b/fastlane/metadata/android/en-US/short_description.txt
deleted file mode 100644
index caf91b81..00000000
--- a/fastlane/metadata/android/en-US/short_description.txt
+++ /dev/null
@@ -1 +0,0 @@
-A simple PDF viewer
diff --git a/fastlane/metadata/android/en-US/title.txt b/fastlane/metadata/android/en-US/title.txt
deleted file mode 100644
index fef099f5..00000000
--- a/fastlane/metadata/android/en-US/title.txt
+++ /dev/null
@@ -1 +0,0 @@
-Pdf Viewer Plus
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 00000000..69757d7a
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,218 @@
+{
+ "nodes": {
+ "android": {
+ "inputs": {
+ "devshell": "devshell",
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ },
+ "locked": {
+ "lastModified": 1688934047,
+ "narHash": "sha256-1cIoNKbfwip71TvD8/+VfTcP5TgIEoa2cDGaT8hamlM=",
+ "owner": "tadfisher",
+ "repo": "android-nixpkgs",
+ "rev": "2051661b5040403147cd077709e333776adba2c6",
+ "type": "github"
+ },
+ "original": {
+ "owner": "tadfisher",
+ "repo": "android-nixpkgs",
+ "type": "github"
+ }
+ },
+ "devshell": {
+ "inputs": {
+ "nixpkgs": [
+ "android",
+ "nixpkgs"
+ ],
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1688380630,
+ "narHash": "sha256-8ilApWVb1mAi4439zS3iFeIT0ODlbrifm/fegWwgHjA=",
+ "owner": "numtide",
+ "repo": "devshell",
+ "rev": "f9238ec3d75cefbb2b42a44948c4e8fb1ae9a205",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "devshell",
+ "type": "github"
+ }
+ },
+ "devshell_2": {
+ "inputs": {
+ "nixpkgs": "nixpkgs_2",
+ "systems": "systems_3"
+ },
+ "locked": {
+ "lastModified": 1688380630,
+ "narHash": "sha256-8ilApWVb1mAi4439zS3iFeIT0ODlbrifm/fegWwgHjA=",
+ "owner": "numtide",
+ "repo": "devshell",
+ "rev": "f9238ec3d75cefbb2b42a44948c4e8fb1ae9a205",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "devshell",
+ "type": "github"
+ }
+ },
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems_2"
+ },
+ "locked": {
+ "lastModified": 1687709756,
+ "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "flake-utils_2": {
+ "inputs": {
+ "systems": "systems_4"
+ },
+ "locked": {
+ "lastModified": 1687709756,
+ "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1688679045,
+ "narHash": "sha256-t3xGEfYIwhaLTPU8FLtN/pLPytNeDwbLI6a7XFFBlGo=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "3c7487575d9445185249a159046cc02ff364bff8",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_2": {
+ "locked": {
+ "lastModified": 1677383253,
+ "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
+ "lastModified": 1688935634,
+ "narHash": "sha256-qYMGjzCoTPhrCE7UYB560+X1VOVKDuXHqAhZ3IXd9eA=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "d8eeece8751ffd71c513e412310ad30b89638093",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "android": "android",
+ "devshell": "devshell_2",
+ "flake-utils": "flake-utils_2",
+ "nixpkgs": "nixpkgs_3"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_2": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_3": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ },
+ "systems_4": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 00000000..43401bd5
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,54 @@
+{
+ description = "My Android project";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs";
+ devshell.url = "github:numtide/devshell";
+ flake-utils.url = "github:numtide/flake-utils";
+ android.url = "github:tadfisher/android-nixpkgs";
+ };
+
+ outputs = { self, nixpkgs, devshell, flake-utils, android }:
+ {
+ overlay = final: prev: {
+ inherit (self.packages.${final.system}) android-sdk android-studio;
+ };
+ }
+ //
+ flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
+ let
+ pkgs = import nixpkgs {
+ inherit system;
+ config.allowUnfree = true;
+ overlays = [
+ devshell.overlays.default
+ self.overlay
+ ];
+ };
+ in
+ {
+ packages = {
+ android-sdk = android.sdk.${system} (sdkPkgs: with sdkPkgs; [
+ # Useful packages for building and testing.
+ build-tools-30-0-2
+ cmdline-tools-latest
+ emulator
+ platform-tools
+ platforms-android-30
+
+ # Other useful packages for a development environment.
+ sources-android-30
+ system-images-android-30-google-apis-x86
+ system-images-android-30-google-apis-playstore-x86
+ ]);
+
+ # android-studio = pkgs.androidStudioPackages.stable;
+ android-studio = pkgs.androidStudioPackages.beta;
+ # android-studio = pkgs.androidStudioPackages.preview;
+ # android-studio = pkgs.androidStudioPackage.canary;
+ };
+
+ devShell = import ./nix/devshell.nix { inherit pkgs; };
+ }
+ );
+}
diff --git a/gradle.properties b/gradle.properties
old mode 100755
new mode 100644
index 9e6fce10..3c5031eb
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,19 +1,23 @@
# Project-wide Gradle settings.
-
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
-
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
-
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
-android.enableJetifier=true
-android.useAndroidX=true
-org.gradle.jvmargs=-Xmx1536m
-
+org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
+# AndroidX package structure to make it clearer which packages are bundled with the
+# Android operating system, and which are packaged with your app's APK
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
+android.useAndroidX=true
+# Kotlin code style for this project: "official" or "obsolete":
+kotlin.code.style=official
+# Enables namespacing of each library's R class so that its R class includes only the
+# resources declared in the library itself and none from the library's dependencies,
+# thereby reducing the size of the R class for that library
+android.nonTransitiveRClass=true
\ No newline at end of file
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
old mode 100755
new mode 100644
index 13372aef..e708b1c0
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
old mode 100755
new mode 100644
index ea0f0406..8775ca9f
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Dec 20 10:40:56 PST 2020
+#Sun Jul 09 14:27:15 PDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
diff --git a/gradlew b/gradlew
index 9d82f789..4f906e0c 100755
--- a/gradlew
+++ b/gradlew
@@ -1,4 +1,20 @@
-#!/usr/bin/env bash
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
##############################################################################
##
@@ -6,20 +22,38 @@
##
##############################################################################
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
-warn ( ) {
+warn () {
echo "$*"
}
-die ( ) {
+die () {
echo
echo "$*"
echo
@@ -30,6 +64,7 @@ die ( ) {
cygwin=false
msys=false
darwin=false
+nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
@@ -40,28 +75,14 @@ case "`uname`" in
MINGW* )
msys=true
;;
+ NONSTOP* )
+ nonstop=true
+ ;;
esac
-# Attempt to set APP_HOME
-# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
-done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
@@ -85,7 +106,7 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
@@ -105,10 +126,11 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
@@ -134,27 +156,30 @@ if $cygwin ; then
else
eval `echo args$i`="\"$arg\""
fi
- i=$((i+1))
+ i=`expr $i + 1`
done
case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
-# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
-function splitJvmOpts() {
- JVM_OPTS=("$@")
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
}
-eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
-JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
old mode 100755
new mode 100644
index 8a0b282a..ac1b06f9
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,90 +1,89 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/images/high_res.png b/images/high_res.png
deleted file mode 100755
index 0cb3c4ae..00000000
Binary files a/images/high_res.png and /dev/null differ
diff --git a/issue_template.md b/issue_template.md
deleted file mode 100644
index 945492d5..00000000
--- a/issue_template.md
+++ /dev/null
@@ -1,12 +0,0 @@
-### Issue Summary
-
-(write here)
-
-### Steps to Reproduce the Problem
-
-(write here)
-
-### Specifications
-
- - App Version:
- - Android Version:
diff --git a/nix/devshell.nix b/nix/devshell.nix
new file mode 100644
index 00000000..d62d5e1b
--- /dev/null
+++ b/nix/devshell.nix
@@ -0,0 +1,33 @@
+{ pkgs }:
+
+with pkgs;
+
+# Configure your development environment.
+#
+# Documentation: https://github.com/numtide/devshell
+devshell.mkShell {
+ name = "android-project";
+ motd = ''
+ Entered the Android app development environment.
+ '';
+ env = [
+ {
+ name = "ANDROID_HOME";
+ value = "${android-sdk}/share/android-sdk";
+ }
+ {
+ name = "ANDROID_SDK_ROOT";
+ value = "${android-sdk}/share/android-sdk";
+ }
+ {
+ name = "JAVA_HOME";
+ value = jdk11.home;
+ }
+ ];
+ packages = [
+ android-studio
+ android-sdk
+ gradle
+ jdk11
+ ];
+}
diff --git a/settings.gradle b/settings.gradle
old mode 100755
new mode 100644
index e7b4def4..50a505ef
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1,16 @@
+pluginManagement {
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+rootProject.name = "Pdfviewer"
include ':app'