Open RaymanMartin opened 5 years ago
I just have the same problem after moving to AndroidX. Currently using these versions: glide 4.9.0 glide-transformations 4.0.1
i am facing the same problem
anyone who is facing the same problem, please vote for @RaymanMartin.
i am facing the same problem
i am facing the same problem too.
i am facing the same problem too.
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)).
GlideApp .with(context) .load(url) .transform(new CenterCrop(), new RoundedCornersTransformation(6, 0)) .into(iv);
RequestOptions options = new RequestOptions().transform(new MultiTransformation<>(new CenterCrop(),
new RoundedCornersTransformation(DisplayUtils.dp2px(10), 0)));
Glide.with(context).load(url).apply(options).into(imageView);
I 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?