From 890fd529e67307ca254d3341ff866a4e6925d9b9 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Fri, 6 Nov 2020 19:05:15 -0500 Subject: [PATCH] update attributions --- app/build.gradle | 4 +- .../fragments/settings/AboutFragment.java | 58 +++++++++++++++---- 2 files changed, 48 insertions(+), 14 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 5ff087f8..26ef9d1c 100755 --- a/app/build.gradle +++ b/app/build.gradle @@ -10,8 +10,8 @@ android { minSdkVersion 21 targetSdkVersion 29 - versionCode 51 - versionName '19.0-a2' + versionCode 52 + versionName '19.0' multiDexEnabled true diff --git a/app/src/main/java/awais/instagrabber/fragments/settings/AboutFragment.java b/app/src/main/java/awais/instagrabber/fragments/settings/AboutFragment.java index 56b150dc..bdca380f 100644 --- a/app/src/main/java/awais/instagrabber/fragments/settings/AboutFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/settings/AboutFragment.java @@ -26,24 +26,26 @@ public class AboutFragment extends BasePreferencesFragment { generalCategory.addPreference(getRepoPreference()); generalCategory.addPreference(getFeedbackPreference()); - final PreferenceCategory thirdPartyCategory = new PreferenceCategory(context); - screen.addPreference(thirdPartyCategory); - thirdPartyCategory.setTitle(R.string.about_category_3pt); - //thirdPartyCategory.setSummary(R.string.about_category_3pt_summary); - thirdPartyCategory.setIconSpaceReserved(false); - // alphabetical order!!! - thirdPartyCategory.addPreference(getExoPlayerPreference()); - thirdPartyCategory.addPreference(getFrescoPreference()); - thirdPartyCategory.addPreference(getJsoupPreference()); - thirdPartyCategory.addPreference(getMDIPreference()); - thirdPartyCategory.addPreference(getRetrofitPreference()); - final PreferenceCategory licenseCategory = new PreferenceCategory(context); screen.addPreference(licenseCategory); licenseCategory.setTitle(R.string.about_category_license); licenseCategory.setIconSpaceReserved(false); licenseCategory.addPreference(getLicensePreference()); licenseCategory.addPreference(getLiabilityPreference()); + + final PreferenceCategory thirdPartyCategory = new PreferenceCategory(context); + screen.addPreference(thirdPartyCategory); + thirdPartyCategory.setTitle(R.string.about_category_3pt); + //thirdPartyCategory.setSummary(R.string.about_category_3pt_summary); + thirdPartyCategory.setIconSpaceReserved(false); + // alphabetical order!!! + thirdPartyCategory.addPreference(getAutolinkPreference()); + thirdPartyCategory.addPreference(getExoPlayerPreference()); + thirdPartyCategory.addPreference(getFrescoPreference()); + thirdPartyCategory.addPreference(getIcafePreference()); + thirdPartyCategory.addPreference(getJsoupPreference()); + thirdPartyCategory.addPreference(getMDIPreference()); + thirdPartyCategory.addPreference(getRetrofitPreference()); } private Preference getDocsPreference() { @@ -174,6 +176,38 @@ public class AboutFragment extends BasePreferencesFragment { return preference; } + private Preference getAutolinkPreference() { + final Context context = getContext(); + if (context == null) return null; + final Preference preference = new Preference(context); + preference.setTitle("AutoLinkTextViewV2"); + preference.setSummary("Copyright (C) 2019 Arman Chatikyan. Apache Version 2.0."); + preference.setIconSpaceReserved(false); + preference.setOnPreferenceClickListener(p -> { + final Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse("https://github.com/armcha/AutoLinkTextViewV2")); + startActivity(intent); + return true; + }); + return preference; + } + + private Preference getIcafePreference() { + final Context context = getContext(); + if (context == null) return null; + final Preference preference = new Preference(context); + preference.setTitle("ICAFE"); + preference.setSummary("Copyright (C) 2014-2019 Wen Yu. Eclipse Version 2.0."); + preference.setIconSpaceReserved(false); + preference.setOnPreferenceClickListener(p -> { + final Intent intent = new Intent(Intent.ACTION_VIEW); + intent.setData(Uri.parse("https://github.com/dragon66/icafe")); + startActivity(intent); + return true; + }); + return preference; + } + private Preference getLicensePreference() { final Context context = getContext(); if (context == null) return null;