From ba2a219168721680cd6e5e553a35a7cbf2614e22 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 6 Jul 2020 22:14:58 +0800 Subject: Show a preview image before autoplaying video is loaded. --- .../infinityforreddit/Adapter/PostRecyclerViewAdapter.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit') 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 0537e0e8..7bc347b6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -522,6 +522,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter cues) { } + + @Override + public void onRenderedFirstFrame() { + mGlide.clear(previewImageView); + previewImageView.setVisibility(View.GONE); + } }); } helper.initialize(container, playbackInfo); @@ -2054,7 +2066,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter= 0.85; + return ToroUtil.visibleAreaOffset(this, itemView.getParent()) >= 0.75; } @Override -- cgit v1.2.3