From bad79c8c7df25e58ba8ef20e6d98af5ea9912b97 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 28 Oct 2020 17:51:33 +0800 Subject: Chnage the animation for random subreddit and post. Update Credits info. --- .../infinityforreddit/Settings/CreditsPreferenceFragment.java | 10 ++++++++++ .../infinityforreddit/Utils/SharedPreferencesUtils.java | 2 ++ 2 files changed, 12 insertions(+) (limited to 'app/src/main/java/ml') 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 7382df42..dc33348b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Settings/CreditsPreferenceFragment.java @@ -35,6 +35,7 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat { Preference bestRocketIconPreference = findPreference(SharedPreferencesUtils.BEST_ROCKET_ICON_KEY); Preference materialIconsPreference = findPreference(SharedPreferencesUtils.MATERIAL_ICONS_KEY); Preference nationalFlagsPreference = findPreference(SharedPreferencesUtils.NATIONAL_FLAGS); + Preference ufoAndCowPreference = findPreference(SharedPreferencesUtils.UFO_CAPTURING_ANIMATION); if (iconForegroundPreference != null) { iconForegroundPreference.setOnPreferenceClickListener(preference -> { @@ -116,6 +117,15 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat { return true; }); } + + if (ufoAndCowPreference != null) { + ufoAndCowPreference.setOnPreferenceClickListener(preference -> { + Intent intent = new Intent(activity, LinkResolverActivity.class); + intent.setData(Uri.parse("https://lottiefiles.com/33858-ufo-capturing-animation")); + 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 940cf3e3..c50de17c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/SharedPreferencesUtils.java @@ -137,6 +137,8 @@ public class SharedPreferencesUtils { public static final String NATIONAL_FLAGS = "national_flags"; public static final String RESPECT_SUBREDDIT_RECOMMENDED_COMMENT_SORT_TYPE = "respect_subreddit_recommended_comment_sort_type"; public static final String SUBREDDIT_FILTER_POPULAR_AND_ALL = "subreddit_filter_popular_and_all"; + public static final String UFO_CAPTURING_ANIMATION = "ufo_capturing_animation"; + 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"; -- cgit v1.2.3