diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-06-20 14:02:18 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-06-20 14:02:18 +0000 |
commit | dce5777fbbaa7d8611c819fe3a75ab7f85a9a09d (patch) | |
tree | e9bb673b424c4e0816e0eb88d76409a05b16596e /app/src/main/res | |
parent | 9f16b6c25aedce4511f9190f9f80e5ae782de55f (diff) | |
download | infinity-for-reddit-dce5777fbbaa7d8611c819fe3a75ab7f85a9a09d.tar infinity-for-reddit-dce5777fbbaa7d8611c819fe3a75ab7f85a9a09d.tar.gz infinity-for-reddit-dce5777fbbaa7d8611c819fe3a75ab7f85a9a09d.tar.bz2 infinity-for-reddit-dce5777fbbaa7d8611c819fe3a75ab7f85a9a09d.tar.lz infinity-for-reddit-dce5777fbbaa7d8611c819fe3a75ab7f85a9a09d.tar.xz infinity-for-reddit-dce5777fbbaa7d8611c819fe3a75ab7f85a9a09d.tar.zst infinity-for-reddit-dce5777fbbaa7d8611c819fe3a75ab7f85a9a09d.zip |
Add an option to automatically try loading removed gfycat videos on Redgifs.
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/activity_view_video.xml | 7 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 6 | ||||
-rw-r--r-- | app/src/main/res/xml/main_preferences.xml | 11 | ||||
-rw-r--r-- | app/src/main/res/xml/video_preferences.xml (renamed from app/src/main/res/xml/autoplay_preferences.xml) | 14 |
4 files changed, 26 insertions, 12 deletions
diff --git a/app/src/main/res/layout/activity_view_video.xml b/app/src/main/res/layout/activity_view_video.xml index 2907fd4d..1d18f2ab 100644 --- a/app/src/main/res/layout/activity_view_video.xml +++ b/app/src/main/res/layout/activity_view_video.xml @@ -15,7 +15,8 @@ android:layout_height="match_parent" android:fillViewport="true"> - <RelativeLayout + <androidx.coordinatorlayout.widget.CoordinatorLayout + android:id="@+id/coordinator_layout_view_video_activity" android:layout_width="match_parent" android:layout_height="match_parent"> @@ -29,10 +30,10 @@ android:id="@+id/progress_bar_view_video_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_centerInParent="true" + android:layout_gravity="center" android:visibility="gone" /> - </RelativeLayout> + </androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.core.widget.NestedScrollView> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 34dc43cb..1eecbe16 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -329,6 +329,7 @@ <string name="settings_interface_title">Interface</string> <string name="settings_gestures_and_buttons_title">Gestures & Buttons</string> <string name="settings_open_link_in_app_title">Open Link In App</string> + <string name="settigns_video_title">Video</string> <string name="settings_video_autoplay_title">Video Autoplay</string> <string name="settings_mute_autoplaying_videos_title">Mute Autoplaying Videos</string> <string name="settings_autoplay_nsfw_videos_title">Autoplay NSFW Videos</string> @@ -343,6 +344,7 @@ <string name="settings_volume_keys_navigate_comments_title">Use Volume Keys to Navigate Comments in Posts</string> <string name="settings_volume_keys_navigate_posts_title">Use Volume Keys to Navigate Posts</string> <string name="settings_mute_video_title">Mute Video</string> + <string name="settings_automatically_try_redgifs_title">Automatically Try Accessing Redgifs if Videos on Gfycat are Removed.</string> <string name="settings_confirm_to_exit">Confirm to Exit</string> <string name="settings_show_top_level_comments_first_title">Show Top-level Comments First</string> <string name="settings_show_comment_divider_title">Show Comment Divider</string> @@ -394,7 +396,7 @@ <string name="settings_credits_material_icons_title">Material Icons</string> <string name="settings_open_source_title">Open Source</string> <string name="settings_open_source_summary">Star it on Github if you like this app</string> - <string name="settings_rate_title">Rate in Google Play</string> + <string name="settings_rate_title">Rate on Google Play</string> <string name="settings_rate_summary">Give me a 5-star rating and I will be really happy</string> <string name="settings_f_droid_title">F-Droid</string> <string name="settings_f_droid_summary">It\'s available in IzzyOnDroid, an F-Droid Repository</string> @@ -788,4 +790,6 @@ <string name="default_font_font_preview">Default</string> + <string name="load_video_in_redgifs">Try loading the video on Redgifs</string> + </resources> diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml index f332a49c..c15bfee4 100644 --- a/app/src/main/res/xml/main_preferences.xml +++ b/app/src/main/res/xml/main_preferences.xml @@ -29,14 +29,9 @@ app:title="@string/settings_open_link_in_app_title" /> <Preference - app:title="@string/settings_video_autoplay_title" - app:fragment="ml.docilealligator.infinityforreddit.Settings.AutoplayPreferenceFragment" /> - - <SwitchPreference - app:defaultValue="false" - app:key="mute_video" - app:icon="@drawable/ic_mute_preferences_24dp" - app:title="@string/settings_mute_video_title" /> + app:title="@string/settigns_video_title" + android:icon="@drawable/ic_outline_video_24dp" + app:fragment="ml.docilealligator.infinityforreddit.Settings.VideoPreferenceFragment" /> <SwitchPreference app:defaultValue="false" diff --git a/app/src/main/res/xml/autoplay_preferences.xml b/app/src/main/res/xml/video_preferences.xml index 5cc344aa..bb690347 100644 --- a/app/src/main/res/xml/autoplay_preferences.xml +++ b/app/src/main/res/xml/video_preferences.xml @@ -2,6 +2,20 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"> + <SwitchPreference + app:defaultValue="false" + app:key="mute_video" + app:icon="@drawable/ic_mute_preferences_24dp" + app:title="@string/settings_mute_video_title" /> + + <SwitchPreference + app:defaultValue="true" + app:key="automatically_try_redgifs" + app:title="@string/settings_automatically_try_redgifs_title" /> + + <PreferenceCategory + app:title="@string/settings_video_autoplay_title" /> + <ListPreference app:defaultValue="0" android:entries="@array/settings_video_autoplay" |