Remove transparent white background from gif image using glide?

谁都会走 提交于 2021-01-29 04:38:35

问题


How can I remove white background around image when loading with glide.. You can find out below code as well as screenshot;

  Glide.with(thiscontext).load(R.drawable.badge_green_yellow)
 .asGif().crossFade()
 .diskCacheStrategy(DiskCacheStrategy.SOURCE).into(holder.ivHourlyIcon);

ScreenShot


回答1:


Put your GIF into the raw folder (res/raw/badge_green_yellow.gif)

and then load it like this

Glide.with(thiscontext).asGif().load(R.raw.badge_green_yellow).into(holder.ivHourlyIcon);


来源:https://stackoverflow.com/questions/54104478/remove-transparent-white-background-from-gif-image-using-glide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!