vinc3m1 / RoundedImageView

A fast ImageView that supports rounded corners, ovals, and circles.
Other
6.44k stars 1.25k forks source link

Glide placeHolder is oval #220

Closed shuwenyouxi closed 6 years ago

shuwenyouxi commented 6 years ago

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?

vinc3m1 commented 6 years ago

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

shuwenyouxi commented 6 years ago

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