如题,glide 设置scaleType,如果图片太小的话,导致设置的圆角无效//glide 圆角 和 scaleType 冲突 导致圆角无效 方法一 val roundedCorners = RequestOptions().transform(RoundedCorners(ScreenUtils.dpToPx(8))) roundedCorners.transform(CenterCrop(), RoundedCorners(ScreenUtils.dpToPx(8))) Glide.with(view.context) .load(url) .placeholder(R.mipmap.ic_music_default) .error(R.mipmap.ic_music_default) .apply(roundedCorners) .into(view) 方法二 Glide.with(view.context) .load(url) .transform(CenterCrop(), RoundedCorners(ScreenUtils.dpToPx(8))) .placeholder(R.mipmap.ic_music_default) .error(R.mipmap.ic_music_default) .apply(roundedCorners) .into(view)
Glide 与ImageView 的scaleType 冲突 圆角无效
于 2022-05-14 17:35:14 首次发布