This repository has been archived by the owner on Feb 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
769b14b
commit 1b93e5f
Showing
31 changed files
with
420 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":5},"path":"app-release.apk","properties":{"packageId":"com.gsnathan.pdfviewer","split":"","minSdkVersion":"19"}}] | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":6},"path":"app-release.apk","properties":{"packageId":"com.gsnathan.pdfviewer","split":"","minSdkVersion":"19"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
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 @@ | |
|
||
/** | ||
* Created by Gokul Swaminathan on 2/22/2018. | ||
* | ||
* NOT IN USE | ||
* | ||
*/ | ||
|
||
public class AboutActivity extends MaterialAboutActivity { | ||
|
@@ -48,7 +50,7 @@ private void buildApp(MaterialAboutCard.Builder appBuilder, final Context contex | |
.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 @@ private void buildApp(MaterialAboutCard.Builder appBuilder, final Context contex | |
.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 void onClick() { | |
.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 void onClick() { | |
.setOnClickAction(new MaterialAboutItemOnClickAction() { | ||
@Override | ||
public void onClick() { | ||
startActivity(new Intent(getApplicationContext(), PrivacyActivity.class)); | ||
startActivity(Utils.navIntent(getApplicationContext(), PrivacyActivity.class)); | ||
} | ||
}) | ||
.build()); | ||
|
@@ -92,7 +105,7 @@ private void buildAuthor(MaterialAboutCard.Builder appBuilder, final Context con | |
.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 @@ private void buildOpenLicenses(MaterialAboutCard.Builder appBuilder, final Conte | |
.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()); | ||
|
@@ -137,17 +150,17 @@ public void onClick() { | |
.setOnClickAction(new MaterialAboutItemOnClickAction() { | ||
@Override | ||
public void onClick() { | ||
showLibs(); | ||
showLibs(); | ||
} | ||
}) | ||
.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 @@ private void buildRateAndReview(MaterialAboutCard.Builder appBuilder, final Cont | |
.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 void onClick() { | |
.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[] { "[email protected]" }); | ||
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 @@ private void showLibs() | |
.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); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.gsnathan.pdfviewer; | ||
|
||
import android.app.Dialog; | ||
import android.content.Context; | ||
import android.content.DialogInterface; | ||
import android.os.Bundle; | ||
import android.support.v4.app.DialogFragment; | ||
import android.support.v7.app.AlertDialog; | ||
import android.view.LayoutInflater; | ||
|
||
import it.gmariotti.changelibs.library.view.ChangeLogRecyclerView; | ||
|
||
/** | ||
* Created by Gokul Swaminathan on 2/25/2018. | ||
*/ | ||
|
||
public class LogFragment extends DialogFragment { | ||
|
||
@Override | ||
public Dialog onCreateDialog(Bundle savedInstanceState) { | ||
LayoutInflater layoutInflater = (LayoutInflater) getActivity().getSystemService( | ||
Context.LAYOUT_INFLATER_SERVICE); | ||
ChangeLogRecyclerView chgList= (ChangeLogRecyclerView) layoutInflater.inflate(R.layout.fragment_log, null); | ||
|
||
|
||
return new AlertDialog.Builder(getActivity(),R.style.AppCompatAlertDialogStyle) | ||
.setTitle(R.string.appChangelog) | ||
.setView(chgList) | ||
.setPositiveButton(R.string.ok, | ||
new DialogInterface.OnClickListener() { | ||
public void onClick(DialogInterface dialog, int whichButton) { | ||
dialog.dismiss(); | ||
} | ||
} | ||
) | ||
.create(); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.