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

Commit 1b93e5f0 authored by JavaCafe01's avatar JavaCafe01
Browse files

A bunch of stuff fixed and added

parent 769b14b3
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -6,9 +6,10 @@ android {
        applicationId "com.gsnathan.pdfviewer"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 5
        versionName "1.4"
        versionCode 6
        versionName "1.5"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true

        javaCompileOptions {
            annotationProcessorOptions {
@@ -33,6 +34,7 @@ dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:support-v4:26.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
@@ -59,5 +61,10 @@ dependencies {
    //View for App Licence
    compile 'com.jgabrielfreitas:licensetextview:1.1.2'

    //Material About Page Library
    compile 'com.github.jrvansuita:MaterialAbout:0.2.0'

    //Changelog Library
    compile 'com.github.gabrielemariotti.changeloglib:changelog:2.1.0'

}
+613 KiB (20.9 MiB)

File changed.

No diff preview for this file type.

+1 −1
Original line number Diff line number Diff line
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":5},"path":"app-release.apk","properties":{"packageId":"com.gsnathan.pdfviewer","split":"","minSdkVersion":"19"}}]
 No newline at end of file
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6},"path":"app-release.apk","properties":{"packageId":"com.gsnathan.pdfviewer","split":"","minSdkVersion":"19"}}]
 No newline at end of file
+16 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@
        <activity
            android:name=".PrivacyActivity"
            android:label="Privacy Policy"
            android:parentActivityName=".AboutActivity"
            android:parentActivityName=".MaterialAboutActivity"
            android:theme="@style/AppTheme">

            <!-- The meta-data tag is required if you support API level 15 and lower -->
@@ -98,7 +98,7 @@
        <activity
            android:name=".LicenseActivity"
            android:label="License"
            android:parentActivityName=".AboutActivity"
            android:parentActivityName=".MaterialAboutActivity"
            android:theme="@style/AppTheme">

            <!-- The meta-data tag is required if you support API level 15 and lower -->
@@ -107,6 +107,20 @@
                android:value=".AboutActivity" />
        </activity>

        <!-- Material About -->
        <activity
            android:name=".MaterialAboutActivity"
            android:label="About"
            android:theme="@style/AppThemeCustom"
            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>

    </application>

</manifest>
 No newline at end of file
+42 −22
Original line number Diff line number Diff line
@@ -5,7 +5,6 @@ import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.support.annotation.NonNull;

import com.danielstone.materialaboutlibrary.MaterialAboutActivity;
@@ -20,6 +19,9 @@ import com.franmontiel.attributionpresenter.entities.License;

/**
 * Created by Gokul Swaminathan on 2/22/2018.
 *
 * NOT IN USE
 *
 */

public class AboutActivity extends MaterialAboutActivity {
@@ -48,7 +50,7 @@ public class AboutActivity extends MaterialAboutActivity {
                .icon(R.mipmap.ic_launcher)
                .build());
        appBuilder.addItem(new MaterialAboutActionItem.Builder()
                .text("Version " + BuildConfig.VERSION_NAME)
                .text("Version " + Utils.getAppVersion())
                .icon(R.drawable.info_outline)
                .build());
        appBuilder.addItem(new MaterialAboutActionItem.Builder()
@@ -57,7 +59,18 @@ public class AboutActivity extends MaterialAboutActivity {
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        startActivity(new Intent(getApplicationContext(), MainIntroActivity.class));
                        startActivity(Utils.navIntent(getApplicationContext(), MainIntroActivity.class));
                    }
                })
                .build());
        appBuilder.addItem(new MaterialAboutActionItem.Builder()
                .text(R.string.appChangelog)
                .icon(R.drawable.clipboard_alert)
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        LogFragment log = new LogFragment();
                        log.show(getSupportFragmentManager(), "Log Fragment");
                    }
                })
                .build());
@@ -67,7 +80,7 @@ public class AboutActivity extends MaterialAboutActivity {
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        startActivity(new Intent(getApplicationContext(), LicenseActivity.class));
                        startActivity(Utils.navIntent(getApplicationContext(), LicenseActivity.class));
                    }
                })
                .build());
@@ -77,7 +90,7 @@ public class AboutActivity extends MaterialAboutActivity {
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        startActivity(new Intent(getApplicationContext(), PrivacyActivity.class));
                        startActivity(Utils.navIntent(getApplicationContext(), PrivacyActivity.class));
                    }
                })
                .build());
@@ -92,7 +105,7 @@ public class AboutActivity extends MaterialAboutActivity {
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/JavaCafe01")));
                        startActivity(Utils.linkIntent("https://github.com/JavaCafe01"));
                    }
                })
                .build());
@@ -127,7 +140,7 @@ public class AboutActivity extends MaterialAboutActivity {
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/JavaCafe01/PdfViewer")));
                        startActivity(Utils.linkIntent("https://github.com/JavaCafe01/PdfViewer"));
                    }
                })
                .build());
@@ -143,11 +156,11 @@ public class AboutActivity extends MaterialAboutActivity {
                .build());
        appBuilder.addItem(new MaterialAboutActionItem.Builder()
                .text(R.string.icon)
                .icon(R.drawable.favicon)
                .icon(R.drawable.favicon_black)
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://materialdesignicons.com/")));
                        startActivity(Utils.linkIntent("https://materialdesignicons.com/"));
                    }
                })
                .build());
@@ -161,7 +174,7 @@ public class AboutActivity extends MaterialAboutActivity {
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=com.gsnathan.pdfviewer")));
                        startActivity(Utils.linkIntent("http://play.google.com/store/apps/details?id=com.gsnathan.pdfviewer"));
                    }
                })
                .build());
@@ -171,22 +184,12 @@ public class AboutActivity extends MaterialAboutActivity {
                .setOnClickAction(new MaterialAboutItemOnClickAction() {
                    @Override
                    public void onClick() {
                        showReviewPage();
                        startActivity(Utils.emailIntent(EMAIL,"Pdf Viewer Plus Review", Utils.getAndroidVersion() + "\n\nFeedback:\n", "Send Feedback:"));
                    }
                })
                .build());
    }

    private void showReviewPage()
    {
        Intent Email = new Intent(Intent.ACTION_SEND);
        Email.setType("text/email");
        Email.putExtra(Intent.EXTRA_EMAIL, new String[] { "gsnathandev@outlook.com" });
        Email.putExtra(Intent.EXTRA_SUBJECT, "Pdf Viewer Plus Review");
        Email.putExtra(Intent.EXTRA_TEXT, Utils.getAndroidVersion() + "\n\nFeedback:\n");
        startActivity(Intent.createChooser(Email, "Send Feedback:"));
    }

    private void showLibs()
    {
        AttributionPresenter attributionPresenter = new AttributionPresenter.Builder(this)
@@ -261,12 +264,29 @@ public class AboutActivity extends MaterialAboutActivity {
                                .setWebsite("https://github.com/webianks/EasyFeedback")
                                .build()
                )
                .addAttributions(
                        new Attribution.Builder("Material About")
                                .addCopyrightNotice("Copyright 2016 Arleu Cezar Vansuita Júnior")
                                .addLicense(License.MIT)
                                .setWebsite("https://github.com/jrvansuita/MaterialAbout")
                                .build()
                )
                .addAttributions(
                        new Attribution.Builder("ChangeLog Library")
                                .addCopyrightNotice("Copyright 2013-2015 Gabriele Mariotti")
                                .addLicense(License.APACHE)
                                .setWebsite("https://github.com/gabrielemariotti/changeloglib")
                                .build()
                )
                .build();

        //show license dialogue
        attributionPresenter.showDialog("Open Source Libraries");
    }




    @Override
    protected CharSequence getActivityTitle() {
        return getString(R.string.action_about);
Loading