aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-09-29 06:18:48 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-09-29 06:18:48 +0000
commit8dd4759035bae9cff7a0d8bd0af1d1624193c796 (patch)
tree006736f4f0c15ea1a9a80991abc9be057d3a0ce5
parentd7f85cb471038498332195c9a1bdea794ec32068 (diff)
downloadinfinity-for-reddit-8dd4759035bae9cff7a0d8bd0af1d1624193c796.tar
infinity-for-reddit-8dd4759035bae9cff7a0d8bd0af1d1624193c796.tar.gz
infinity-for-reddit-8dd4759035bae9cff7a0d8bd0af1d1624193c796.tar.bz2
infinity-for-reddit-8dd4759035bae9cff7a0d8bd0af1d1624193c796.tar.lz
infinity-for-reddit-8dd4759035bae9cff7a0d8bd0af1d1624193c796.tar.xz
infinity-for-reddit-8dd4759035bae9cff7a0d8bd0af1d1624193c796.tar.zst
infinity-for-reddit-8dd4759035bae9cff7a0d8bd0af1d1624193c796.zip
Add credits for national flag icons.
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java10
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java1
-rw-r--r--app/src/main/res/values/strings.xml7
-rw-r--r--app/src/main/res/xml/about_preferences.xml3
-rw-r--r--app/src/main/res/xml/credits_preferences.xml5
5 files changed, 22 insertions, 4 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java
index 3bb14843..7382df42 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java
@@ -34,6 +34,7 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat {
Preference thumbtackIconPreference = findPreference(SharedPreferencesUtils.THUMBTACK_ICON_KEY);
Preference bestRocketIconPreference = findPreference(SharedPreferencesUtils.BEST_ROCKET_ICON_KEY);
Preference materialIconsPreference = findPreference(SharedPreferencesUtils.MATERIAL_ICONS_KEY);
+ Preference nationalFlagsPreference = findPreference(SharedPreferencesUtils.NATIONAL_FLAGS);
if (iconForegroundPreference != null) {
iconForegroundPreference.setOnPreferenceClickListener(preference -> {
@@ -106,6 +107,15 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat {
return true;
});
}
+
+ if (nationalFlagsPreference != null) {
+ nationalFlagsPreference.setOnPreferenceClickListener(preference -> {
+ Intent intent = new Intent(activity, LinkResolverActivity.class);
+ intent.setData(Uri.parse("https://www.flaticon.com/packs/countrys-flags"));
+ startActivity(intent);
+ return true;
+ });
+ }
}
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java
index 141cceaa..78c1567f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java
@@ -134,6 +134,7 @@ public class SharedPreferencesUtils {
public static final String DATA_SAVING_MODE_OFF = "0";
public static final String DATA_SAVING_MODE_ONLY_ON_CELLULAR_DATA = "1";
public static final String DATA_SAVING_MODE_ALWAYS = "2";
+ public static final String NATIONAL_FLAGS = "national_flags";
public static final String MAIN_PAGE_TABS_SHARED_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit.main_page_tabs";
public static final String MAIN_PAGE_TAB_COUNT = "_main_page_tab_count";
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 018969fa..bd3f0681 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -490,7 +490,10 @@
<string name="settings_bottom_app_bar_fab">Floating Action Button</string>
<string name="settings_data_saving_mode">Data Saving Mode</string>
<string name="settings_data_saving_mode_info_summary">In data saving mode, preview images are in lower resolution.</string>
- <string name="settings_translation">Translation</string>
+ <string name="settings_translation_title">Translation</string>
+ <string name="settings_translation_summary">Translate this app on POEditor. Thanks to all contributors.</string>
+ <string name="settings_credits_national_flags">National Flags</string>
+ <string name="settings_credits_national_flags_summary">Icon made by Freepik from www.flaticon.com</string>
<string name="no_link_available">Cannot get the link</string>
@@ -908,7 +911,5 @@
<string name="give_award_error_message">Code: %1$d/\n Message: %2$s</string>
<string name="give_award_success">Award given</string>
<string name="give_award_failed">Failed</string>
- <!-- TODO: Remove or change this placeholder text -->
- <string name="hello_blank_fragment">Hello blank fragment</string>
</resources>
diff --git a/app/src/main/res/xml/about_preferences.xml b/app/src/main/res/xml/about_preferences.xml
index 74a17eaa..03ba5f4e 100644
--- a/app/src/main/res/xml/about_preferences.xml
+++ b/app/src/main/res/xml/about_preferences.xml
@@ -12,7 +12,8 @@
<Preference
android:key="translation"
- app:title="@string/settings_translation"
+ app:title="@string/settings_translation_title"
+ app:summary="@string/settings_translation_summary"
app:fragment="ml.docilealligator.infinityforreddit.Settings.TranslationFragment"/>
<Preference
diff --git a/app/src/main/res/xml/credits_preferences.xml b/app/src/main/res/xml/credits_preferences.xml
index 8e622332..5e97d5f2 100644
--- a/app/src/main/res/xml/credits_preferences.xml
+++ b/app/src/main/res/xml/credits_preferences.xml
@@ -41,4 +41,9 @@
android:key="material_icons"
app:title="@string/settings_credits_material_icons_title"/>
+ <Preference
+ app:key="national_flags"
+ app:title="@string/settings_credits_national_flags"
+ android:summary="@string/settings_credits_national_flags_summary" />
+
</PreferenceScreen>