Closed AlaaZarifa closed 2 years ago
Check if the problem is with your GIF image, I tested it and it's OK with the following code:
@Override
protected void bindData(BaseViewHolder<BannerData> holder, BannerData data, int position,
int pageSize) {
if (getViewType(position) == BannerData.TYPE_NEW) {
holder.setImageResource(R.id.image_view, data.getDrawable());
} else {
ImageView imageView = holder.findViewById(R.id.banner_image);
Glide.with(imageView)
.asGif()
.load("https://ss2.baidu.com/-vo3dSag_xI4khGko9WTAnF6hhy/baike/s=220/sign=b1889182d01b0ef468e89f5cedc551a1/cefc1e178a82b9015fda1a9f718da9773912ef23.jpg")
.placeholder(R.drawable.placeholder)
.into(imageView);
}
}
In my use case some of the images are GIF and I use Glide to play them but it only show a still image or a frame.