diff options
author | Alex Ning <chineseperson5@gmail.com> | 2021-09-03 07:15:44 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2021-09-03 07:15:44 +0000 |
commit | c37d372b8154e5eaffbd5618e636528c50ed191b (patch) | |
tree | a890c344c2e90daf73f1344fffd6c1082c30b06b /app/src/main | |
parent | 39b5beb5c5face6ea7d40e4473ec1df650335833 (diff) | |
download | infinity-for-reddit-c37d372b8154e5eaffbd5618e636528c50ed191b.tar infinity-for-reddit-c37d372b8154e5eaffbd5618e636528c50ed191b.tar.gz infinity-for-reddit-c37d372b8154e5eaffbd5618e636528c50ed191b.tar.bz2 infinity-for-reddit-c37d372b8154e5eaffbd5618e636528c50ed191b.tar.lz infinity-for-reddit-c37d372b8154e5eaffbd5618e636528c50ed191b.tar.xz infinity-for-reddit-c37d372b8154e5eaffbd5618e636528c50ed191b.tar.zst infinity-for-reddit-c37d372b8154e5eaffbd5618e636528c50ed191b.zip |
Update Credits page.
Diffstat (limited to 'app/src/main')
6 files changed, 25 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 0ad8ad65..5ae530f2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CreditsPreferenceFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CreditsPreferenceFragment.java @@ -37,6 +37,7 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat { Preference nationalFlagsPreference = findPreference(SharedPreferencesUtils.NATIONAL_FLAGS); Preference ufoAndCowPreference = findPreference(SharedPreferencesUtils.UFO_CAPTURING_ANIMATION); Preference loveAnimationPreference = findPreference(SharedPreferencesUtils.LOVE_ANIMATION); + Preference lockScreenPreference = findPreference(SharedPreferencesUtils.LOCK_SCREEN_ANIMATION); if (iconForegroundPreference != null) { iconForegroundPreference.setOnPreferenceClickListener(preference -> { @@ -136,6 +137,15 @@ public class CreditsPreferenceFragment extends PreferenceFragmentCompat { return true; }); } + + if (lockScreenPreference != null) { + lockScreenPreference.setOnPreferenceClickListener(preference -> { + Intent intent = new Intent(activity, LinkResolverActivity.class); + intent.setData(Uri.parse("https://lottiefiles.com/69178-cool")); + 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 f3247d99..7760f465 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/SharedPreferencesUtils.java @@ -187,6 +187,7 @@ public class SharedPreferencesUtils { public static final String DEFAULT_LINK_POST_LAYOUT_KEY = "default_link_post_layout"; public static final String USE_BOTTOM_TOOLBAR_IN_MEDIA_VIEWER = "use_bottom_toolbar_in_media_viewer"; public static final String SECURE_MODE = "secure_mode"; + public static final String LOCK_SCREEN_ANIMATION = "lock_screen_animation"; public static final String DEFAULT_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit_preferences"; public static final String MAIN_PAGE_TABS_SHARED_PREFERENCES_FILE = "ml.docilealligator.infinityforreddit.main_page_tabs"; diff --git a/app/src/main/res/layout-land/activity_lock_screen.xml b/app/src/main/res/layout-land/activity_lock_screen.xml index d863b707..2218ce78 100644 --- a/app/src/main/res/layout-land/activity_lock_screen.xml +++ b/app/src/main/res/layout-land/activity_lock_screen.xml @@ -20,7 +20,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:fontFamily="?attr/font_family" - android:text="Whoa there!!!" + android:text="@string/lock_screen_text" android:textSize="?attr/font_20" app:layout_constraintBottom_toTopOf="@+id/unlock_button_lock_screen_activity" app:layout_constraintEnd_toEndOf="parent" @@ -32,7 +32,7 @@ android:id="@+id/unlock_button_lock_screen_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Unlock" + android:text="@string/unlock" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/lottie_animation_view" diff --git a/app/src/main/res/layout/activity_lock_screen.xml b/app/src/main/res/layout/activity_lock_screen.xml index ef8ba1fb..e1e37168 100644 --- a/app/src/main/res/layout/activity_lock_screen.xml +++ b/app/src/main/res/layout/activity_lock_screen.xml @@ -20,7 +20,8 @@ android:id="@+id/text_view_lock_screen_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Whoa there!!!" + android:layout_marginTop="16dp" + android:text="@string/lock_screen_text" android:textSize="?attr/font_20" android:fontFamily="?attr/font_family" app:layout_constraintTop_toBottomOf="@id/lottie_animation_view" @@ -31,7 +32,8 @@ android:id="@+id/unlock_button_lock_screen_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="Unlock" + android:layout_marginTop="16dp" + android:text="@string/unlock" app:layout_constraintTop_toBottomOf="@id/text_view_lock_screen_activity" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" /> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 1fe15781..1de4ba0f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -596,6 +596,7 @@ <string name="settings_use_bottom_toolbar_in_media_viewer_title">Use Bottom Toolbar in Media Viewer</string> <string name="settings_secure_mode_title">Secure Mode</string> <string name="settings_secure_mode_summary">Screenshot and video recording are not allowed. No preview in recent app screen.</string> + <string name="settings_credits_lock_screen_animation_title">Lock Screen Animation</string> <string name="no_link_available">Cannot get the link</string> @@ -1169,4 +1170,6 @@ <string name="material_you_notification_title">Applying Material You</string> + <string name="lock_screen_text">Whoa there!!!</string> + </resources> diff --git a/app/src/main/res/xml/credits_preferences.xml b/app/src/main/res/xml/credits_preferences.xml index 3578d62f..f7145096 100644 --- a/app/src/main/res/xml/credits_preferences.xml +++ b/app/src/main/res/xml/credits_preferences.xml @@ -56,4 +56,9 @@ app:title="@string/settings_credits_love_animation_title" android:summary="https://lottiefiles.com/52103-love" /> + <Preference + app:key="lock_screen_animation" + app:title="@string/settings_credits_lock_screen_animation_title" + android:summary="https://lottiefiles.com/69178-cool" /> + </PreferenceScreen> |