diff options
author | Docile-Alligator <chineseperson5@gmail.com> | 2022-04-10 01:40:16 +0000 |
---|---|---|
committer | Docile-Alligator <chineseperson5@gmail.com> | 2022-04-10 01:40:16 +0000 |
commit | bbd212ff2c4e7e77eb1332eeab440dfe13a3d40d (patch) | |
tree | eb9f13ad089b3fad6ee27ae9412549d6a0a76d88 /app/src/main/java | |
parent | e7da8c1f692745255753d30fc74720f8494e576c (diff) | |
download | infinity-for-reddit-bbd212ff2c4e7e77eb1332eeab440dfe13a3d40d.tar infinity-for-reddit-bbd212ff2c4e7e77eb1332eeab440dfe13a3d40d.tar.gz infinity-for-reddit-bbd212ff2c4e7e77eb1332eeab440dfe13a3d40d.tar.bz2 infinity-for-reddit-bbd212ff2c4e7e77eb1332eeab440dfe13a3d40d.tar.lz infinity-for-reddit-bbd212ff2c4e7e77eb1332eeab440dfe13a3d40d.tar.xz infinity-for-reddit-bbd212ff2c4e7e77eb1332eeab440dfe13a3d40d.tar.zst infinity-for-reddit-bbd212ff2c4e7e77eb1332eeab440dfe13a3d40d.zip |
Click autoplaying videos to open them in fullscreen.
Diffstat (limited to 'app/src/main/java')
2 files changed, 20 insertions, 5 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java index ba59a7fd..fca4fd35 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -1722,8 +1722,12 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler } }); - previewImageView.setOnLongClickListener(view -> fullscreenButton.performClick()); - playerView.setOnLongClickListener(view -> fullscreenButton.performClick()); + previewImageView.setOnClickListener(view -> fullscreenButton.performClick()); + playerView.setOnClickListener(view -> { + if (playerView.isControllerVisible()) { + fullscreenButton.performClick(); + } + }); } void bindVideoUri(Uri videoUri) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 065dbf81..450f37bf 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -2694,7 +2694,6 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie private Uri mediaUri; private float volume; public Call<String> fetchGfycatOrStreamableVideoCall; - //public FetchGfycatOrRedgifsVideoLinks fetchGfycatOrRedgifsVideoLinks; PostVideoAutoplayViewHolder(View itemView) { super(itemView); @@ -2787,7 +2786,13 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie } }); - previewImageView.setOnLongClickListener(view -> fullscreenButton.performClick()); + previewImageView.setOnClickListener(view -> fullscreenButton.performClick()); + + videoPlayer.setOnClickListener(view -> { + if (videoPlayer.isControllerVisible()) { + fullscreenButton.performClick(); + } + }); } void bindVideoUri(Uri videoUri) { @@ -4096,7 +4101,13 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie } }); - previewImageView.setOnLongClickListener(view -> fullscreenButton.performClick()); + previewImageView.setOnClickListener(view -> fullscreenButton.performClick()); + + videoPlayer.setOnClickListener(view -> { + if (videoPlayer.isControllerVisible()) { + fullscreenButton.performClick(); + } + }); } void bindVideoUri(Uri videoUri) { |