Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit a2bb9e53 authored by gokul swaminathan's avatar gokul swaminathan Committed by GitHub
Browse files

Merge pull request #91 from JavaCafe01/dev

Dev
parents 7ccf9f5f 65bf1eea
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@

[![Travis Build Status](https://travis-ci.com/JavaCafe01/PdfViewer.svg?branch=master)](https://travis-ci.com/JavaCafe01/PdfViewer)
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/JavaCafe01/PdfViewer/blob/master/LICENSE)
[![PayPal donation](https://img.shields.io/badge/donate-paypal-yellow.svg)](https://www.paypal.me/gsnathan)

## Download

+6 −11
Original line number Diff line number Diff line
@@ -37,8 +37,8 @@ android {
        applicationId "com.gsnathan.pdfviewer"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 25
        versionName "3.4"
        versionCode 26
        versionName "3.5"
        vectorDrawables.useSupportLibrary = true

        javaCompileOptions {
@@ -71,20 +71,15 @@ android {
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0-beta01'
    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'

    //Library for Card View Layout
    implementation 'androidx.cardview:cardview:1.0.0'

    //Rating Library
    implementation 'io.github.kobakei:ratethisapp:1.2.0'

    //Pdf Viewer Library (Proguard config done)
    implementation 'com.github.barteksc:android-pdf-viewer:3.2.0-beta.1'

+7 −17
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@

        <activity
            android:name=".MainActivity_"
            android:theme="@style/Theme.Cyanea.Light.DarkActionBar">
            android:documentLaunchMode="intoExisting">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

@@ -52,6 +52,7 @@
                <data android:host="*" />
                <data android:scheme="file" />
                <data android:scheme="content" />
                <!-- Workaround to match files in paths with dots in them, like /sdcard/my.folder/test.pdf -->
                <data android:pathPattern=".*\\.pdf" />
                <data android:pathPattern=".*\\..*\\.pdf" />
                <data android:pathPattern=".*\\..*\\..*\\.pdf" />
@@ -68,6 +69,7 @@
                <data android:mimeType="application/pdf" />
            </intent-filter>
        </activity>

        <!-- Alias to allow the user to hide the app from launcher -->
        <activity-alias
            android:name=".LauncherAlias"
@@ -83,29 +85,17 @@
        <activity
            android:name=".AboutActivity"
            android:label="About"
            android:parentActivityName=".MainActivity_"
            android:theme="@style/Theme.Cyanea.Light.DarkActionBar">
            android:parentActivityName=".MainActivity_" />

            <!-- The meta-data tag is required if you support API level 15 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="MainActivity_" />
        </activity>
        <activity
            android:name=".MainIntroActivity"
            android:label="@string/intro" /> <!-- Contr -->
            android:label="@string/intro"
            android:theme="@style/Theme.AppCompat.Light.DarkActionBar" />

        <activity
            android:name=".SettingsActivity"
            android:label="Settings"
            android:parentActivityName=".MainActivity_"
            android:theme="@style/Theme.Cyanea.Light.DarkActionBar">

            <!-- The meta-data tag is required if you support API level 15 and lower -->
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="MainActivity_" />
        </activity>
            android:parentActivityName=".MainActivity_" />
    </application>

</manifest>
 No newline at end of file
+0 −7
Original line number Diff line number Diff line
@@ -147,13 +147,6 @@ public class AboutActivity extends CyaneaAppCompatActivity {
                                .setWebsite("https://github.com/TonnyL/WhatsNew")
                                .build()
                )
                .addAttributions(
                        new Attribution.Builder("RateThisApp")
                                .addCopyrightNotice("Copyright 2017 Keisuke Kobayashi")
                                .addLicense(License.APACHE)
                                .setWebsite("https://github.com/kobakei/Android-RateThisApp")
                                .build()
                )
                .addAttributions(
                        new Attribution.Builder("Cyanea")
                                .addCopyrightNotice("Copyright 2018 Jared Rummler")
+0 −102
Original line number Diff line number Diff line
package com.gsnathan.pdfviewer;

import android.content.res.Configuration;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.MenuInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jaredrummler.cyanea.app.CyaneaPreferenceActivity;

import androidx.annotation.LayoutRes;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.widget.Toolbar;

public abstract class AppCompatPreferenceActivity extends CyaneaPreferenceActivity {

    private AppCompatDelegate mDelegate;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        getDelegate().installViewFactory();
        getDelegate().onCreate(savedInstanceState);
        super.onCreate(savedInstanceState);
    }

    @Override
    protected void onPostCreate(Bundle savedInstanceState) {
        super.onPostCreate(savedInstanceState);
        getDelegate().onPostCreate(savedInstanceState);
    }

    public ActionBar getSupportActionBar() {
        return getDelegate().getSupportActionBar();
    }

    public void setSupportActionBar(@Nullable Toolbar toolbar) {
        getDelegate().setSupportActionBar(toolbar);
    }

    @Override
    public MenuInflater getMenuInflater() {
        return getDelegate().getMenuInflater();
    }

    @Override
    public void setContentView(@LayoutRes int layoutResID) {
        getDelegate().setContentView(layoutResID);
    }

    @Override
    public void setContentView(View view) {
        getDelegate().setContentView(view);
    }

    @Override
    public void setContentView(View view, ViewGroup.LayoutParams params) {
        getDelegate().setContentView(view, params);
    }

    @Override
    public void addContentView(View view, ViewGroup.LayoutParams params) {
        getDelegate().addContentView(view, params);
    }

    @Override
    protected void onPostResume() {
        super.onPostResume();
        getDelegate().onPostResume();
    }

    @Override
    protected void onTitleChanged(CharSequence title, int color) {
        super.onTitleChanged(title, color);
        getDelegate().setTitle(title);
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        getDelegate().onConfigurationChanged(newConfig);
    }

    @Override
    protected void onStop() {
        super.onStop();
        getDelegate().onStop();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        getDelegate().onDestroy();
    }

    public void invalidateOptionsMenu() {
        getDelegate().invalidateOptionsMenu();
    }

}
Loading