Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sylyac2000/fa1186ae0d3ad4e59567f1c2798ae58f to your computer and use it in GitHub Desktop.
Save Sylyac2000/fa1186ae0d3ad4e59567f1c2798ae58f to your computer and use it in GitHub Desktop.
DrawableRequestBuilder drawableRequestBuilder = Glide.with(This
.load(url)
.fitCenter()
.animate(android.R.anim.fade_in);
if (mMediaFragmentListener.getLocalVideoUri() != null) {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
Context context = getContext();
retriever.setDataSource(context, mMediaFragmentListener.getLocalVideoUri());
Bitmap frame = retriever.getFrameAtTime();
drawableRequestBuilder.placeholder(new BitmapDrawable(context.getResources(), frame));
}
drawableRequestBuilder.into(mThumbnailView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment