Skip to content

Instantly share code, notes, and snippets.

View MarkJoelSingma's full-sized avatar

Mark Joel Singma MarkJoelSingma

View GitHub Profile
@markcadag
markcadag / gist:a88a11bb297537491f9b92a46be719d4
Last active March 6, 2019 14:29
Enable pause and play gif using glide 4.0
Glide.with(holder.itemView)
.asBitmap()
.load("http://i.imgur.com/VuItY0T.gif")
.into(holder.imageContent)
val playPauseGif = PlayPauseGif(holder.imageContent)
holder.imageContent.setOnClickListener{
if (playPauseGif.isPlaying()) {
Log.e(TAG, "pausing")