From d13cce399747637d940b18cc75aad44668b32809 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 7 Nov 2020 09:42:56 +0100 Subject: [PATCH] Fix issue #39 - Allow to display videos in smaller lists --- app/src/acad/res/values/strings.xml | 4 ++++ app/src/full/res/values/strings.xml | 4 ++++ .../fedilabtube/drawer/PeertubeAdapter.java | 17 +++++++++++++++-- .../fedilabtube/fragment/SettingsFragment.java | 18 ++++++++++++++++++ .../res/drawable/ic_baseline_view_list_24.xml | 10 ++++++++++ app/src/main/res/layout/drawer_peertube.xml | 12 ++++++++++++ app/src/main/res/xml/main_preferences.xml | 5 +++++ 7 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 app/src/main/res/drawable/ic_baseline_view_list_24.xml diff --git a/app/src/acad/res/values/strings.xml b/app/src/acad/res/values/strings.xml index 7eaafc2..a72131c 100644 --- a/app/src/acad/res/values/strings.xml +++ b/app/src/acad/res/values/strings.xml @@ -13,6 +13,10 @@ set_autoplay_next_video_choice set_store_in_history set_play_screen_lock_choice + set_video_in_list_choice + + Vidéos dans une liste + Change la mise en page pour afficher les vidéos dans une liste Verrouillage d\'écran diff --git a/app/src/full/res/values/strings.xml b/app/src/full/res/values/strings.xml index 3484106..d8ef9fd 100644 --- a/app/src/full/res/values/strings.xml +++ b/app/src/full/res/values/strings.xml @@ -12,6 +12,10 @@ set_theme_choice set_fullscreen_choice set_play_screen_lock_choice + set_video_in_list_choice + + Videos in list + Change the layout for displaying videos in a list Screen lock Keep playing videos when the screen is locked diff --git a/app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java b/app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java index 8e159d6..a27f188 100644 --- a/app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java +++ b/app/src/main/java/app/fedilab/fedilabtube/drawer/PeertubeAdapter.java @@ -30,6 +30,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.PopupMenu; +import androidx.constraintlayout.widget.ConstraintLayout; import androidx.lifecycle.LifecycleOwner; import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelStoreOwner; @@ -105,6 +106,7 @@ public class PeertubeAdapter extends RecyclerView.Adapter languages = new LinkedHashMap<>(peertubeInformation.getLanguages()); List entriesLanguages = new ArrayList<>(); diff --git a/app/src/main/res/drawable/ic_baseline_view_list_24.xml b/app/src/main/res/drawable/ic_baseline_view_list_24.xml new file mode 100644 index 0000000..9884aeb --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_view_list_24.xml @@ -0,0 +1,10 @@ + + + diff --git a/app/src/main/res/layout/drawer_peertube.xml b/app/src/main/res/layout/drawer_peertube.xml index 7f21632..fc47e2e 100644 --- a/app/src/main/res/layout/drawer_peertube.xml +++ b/app/src/main/res/layout/drawer_peertube.xml @@ -42,6 +42,7 @@ + + \ No newline at end of file