Glide图片被拉伸解决方法

来源:互联网 发布:seo效果检测步骤包括 编辑:程序博客网 时间:2024/05/16 14:00

在使用Glide过程中会出现图片被拉伸的情况,经查开始使用了place holde的缘故,有3种简单方法:

1、取消使用place holde:

Glide.with(context).load(resId). into(imageView);

2、使用place holde加上dontAnimate():

Glide.with(context).load(resId).placeholder(defaultId).dontAnimate().into(imageView);

3、使用asBitmap加载:

Glide.with(context).load(imageUrl).asBitmap().placeholder(defaultId).into(imageView);




0 0
原创粉丝点击