1、添加依赖
implementation 'com.github.bumptech.glide:glide:4.7.1'
2、放置一个ImageView.
3、加载,ivGif是ImageView实例
RequestOptions options = new RequestOptions()
.diskCacheStrategy(DiskCacheStrategy.RESOURCE);
Glide.with(mContext).load(R.drawable.gif1).apply(options).into(ivGif);