private var roundOptions: RequestOptions?=null
roundOptions = RequestOptions().transform(RoundedCorners(DeviceUtil.dip2px(parent.context,6f)))
//处理CenterCrop的情况,保证圆角不失效
roundOptions?.transform(CenterCrop(), RoundedCorners(DeviceUtil.dip2px(parent.context,6f)))
if (roundOptions!=null){
Glide.with(holder.itemView.context)
.load(data.uri)
.apply(roundOptions!!)
.error(R.drawable.icon_videos_default)
.placeholder(R.drawable.icon_videos_default)
.into(holder.itemView.ivDownloaded)
}else{
Glide.with(holder.itemView.context)
.load(data.uri)
.centerCrop()
.error(R.drawable.icon_videos_default)
.placeholder(R.drawable.icon_videos_default)
.into(holder.itemView.ivDownloaded)
}