RoundedCornersTransformation not working in Adapter with CenterCrop
See original GitHub issueI try to use RoundedCornersTransformation to cut the bitmap in Adapter. But its not working good with Glide CenterCrop. and i also saw some issue like this. then i change the usage like this.but it’s also not good working
heres the code i used in Adapter
Glide.with(mContext) .load(avatar) .placeholder(R.drawable.ic_user_default_avatar) .error(R.drawable.ic_user_default_avatar) .transform(new CenterCrop(mContext), new RoundedCornersTransformation(mContext, 4, 0)) .into(ivAvatar);
btw.why the newest dependency library is use Glide 4.x , those i copy the RoundedCornersTransformation source code to my project.
My situation is: while i remove the RoundedCornersTransformation. The CenterCrop is work good. while i remove the CenterCrop.but the RoundedCornersTransformation is still not working.
Is there’s some solutions to fix this problem?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:8

Top Related StackOverflow Question
GlideApp .with(context) .load(url) .transform(new CenterCrop(), new RoundedCornersTransformation(6, 0)) .into(iv);
RoundedCornersTransformation extends BitmapTransformation ,in glide4.9,BitmapTransformation remove context in constructor. I copy and modify RoundedCornersTransformation constructor. it is normal, transform(new CenterCrop(),new RoundedCornersTransformation (5, 0, RoundedCornersTransformation .CornerType.LEFT)).