penfeizhou / APNG4Android

Android animation support for APNG & Animated WebP & Gif & Animated AVIF, High performance
Apache License 2.0
570 stars 75 forks source link

使用Glide插件 加载没有动画效果了? #186

Closed skyofsky closed 1 year ago

skyofsky commented 1 year ago

New Issue Checklist

Issue Info

kotlin语言

1.Glide.with(this).load("https://isparta.github.io/compare-webp/image/gif_webp/webp/2.webp") .into(it)

  1. Glide.with(this).load("https://isparta.github.io/compare-webp/image/gif_webp/webp/2.webp") .into(object : CustomTarget() { override fun onResourceReady( resource: Drawable, transition: Transition? ) { LogUtils.e("resource.javaClass.name=${resource.javaClass.name} ${resource.intrinsicWidth}") if(resource is WebPDrawable){ binding?.enterRoomWebp?.setImageDrawable((resource as WebPDrawable)) } }

                    override fun onLoadCleared(placeholder: Drawable?) {
    
                    }
    
                })

    resource.javaClass.name=com.github.penfeizhou.animation.webp.WebPDrawable

penfeizhou commented 1 year ago

自己使用CustomTarget的话,请手动开启WebPDrawable

webPDrawable.start()