Glide 设置圆角大小,圆角大小不一致

解决方案:

基于Glide 3.7.0  

//用于Glide圆角的第三方库
compile 'jp.wasabeef:glide-transformations:2.0.1'


Glide.with(cxt).load(url)
        .error(errorPic)
        .crossFade()//渐变时间
        .bitmapTransform(new CenterCrop(mContext),new RoundedCornersTransformation(cxt, roudeAngle, 0, RoundedCornersTransformation.CornerType.TOP))
        .into(view);
如果按照上述做之后还是有个别图片圆角与其他不一致,那就看你是不是用了RecyclerView,作为RecyclerView的item里面图片的大小尺寸设置需要调一下,就可以了

猜你喜欢

转载自blog.csdn.net/Ltp_zy/article/details/80799499