From df1476692dc3cf4bc93ac8a02a58aecf046e532c Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 13 Sep 2020 22:24:50 +0800 Subject: Long press the preview ImageView in video autoplay ViewHolder in PostRecyclerViewAdapter and CommentAndPostRecyclerViewAdapter to open videos in fullscreen. --- .../Adapter/CommentAndPostRecyclerViewAdapter.java | 7 ++++++- .../infinityforreddit/Adapter/PostRecyclerViewAdapter.java | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java index 0faf9c78..05e1d0c5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java @@ -2411,10 +2411,15 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter fullscreenButton.performClick()); + playerView.setOnLongClickListener(view -> fullscreenButton.performClick()); } void bindVideoUri(Uri videoUri) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java index 869442b8..d9e9c0de 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -1892,11 +1892,16 @@ public class PostRecyclerViewAdapter extends PagedListAdapter fullscreenButton.performClick()); + videoPlayer.setOnLongClickListener(view -> fullscreenButton.performClick()); } void bindVideoUri(Uri videoUri) { -- cgit v1.2.3