vinc3m1/RoundedImageView

Glide placeHolder is oval

shuwenyouxi opened this issue · 2 comments

version: 2.3.0
code:

RoundedImageView imageView = new RoundedImageView(getContext());
            imageView.setOval(false);
            imageView.setCornerRadius(SizeUtils.dp2px(6));

 Glide.with(getContext())
                        .load(mThumbUrlList.get(i))
                        .apply(GlideUtils.pictrueContainerOpt)
                        .into(iv);

public static final RequestOptions pictrueContainerOpt = new RequestOptions()
            .placeholder(R.color.cF5F5F8)
            .error(R.drawable.img_err)
            .diskCacheStrategy(DiskCacheStrategy.DATA);

this code will give me a oval placeholder, how to fix it? Is this a bug?

you can use rounded transitions with glide, and don't need roundedimageview: https://github.com/wasabeef/glide-transformations

glide-transformations will cost extra memory, any other way to solve this problem? @vinc3m1