Fresco 加载网络图片被裁剪
来源:互联网 发布:英国硕士绩点算法 编辑:程序博客网 时间:2024/06/10 14:44
遇到一个Fresco 从网络加载图片,被放大并剪裁掉了而显示不全。百思不得解。
对比了本地图片的尺寸跟网络加载图片的尺寸一致,也不存在图片尺寸问题。
<com.facebook.drawee.view.SimpleDraweeView android:id="@+id/img_hot_up_rocket" android:layout_width="26dp" android:layout_height="38dp" android:layout_marginLeft="30dip" android:layout_marginTop="100dip" android:contentDescription="@string/app_name" fresco:placeholderImage="@drawable/live_hot_icon" />
解决: 查阅了fresco 官方文档后, fresco:actualImageScaleType=”fitCenter” 这个属性对SimpleDraweeView 被剪裁bug有效。可能是fresco:placeholderImage占位图的缘故吧。
fix code:
<com.facebook.drawee.view.SimpleDraweeView android:id="@+id/img_hot_up_rocket" android:layout_width="26dp" android:layout_height="38dp" android:layout_marginLeft="30dip" android:layout_marginTop="100dip" android:contentDescription="@string/app_name" fresco:actualImageScaleType="fitCenter" />
PS: 后来得知,有同事因为这个排查了一天。这个坑索性记一下~
阅读全文
0 0
- Fresco 加载网络图片被裁剪
- Android 图片控件Fresco加载网络图片
- 网络图片加载库 Fresco 的使用
- 网络加载图片对比(Fresco/Glide)
- Android网络图片加载~~~ ImageLoader+Picasso+Fresco
- Fresco加载网络图片的使用
- 引入Fresco 网络加载图片的学习
- Fresco 加载本地图片
- Fresco图片加载组件
- 图片加载Fresco
- 使用Fresco加载图片
- 图片加载利器--Fresco
- Fresco图片加载工具
- 图片加载库Fresco
- fresco加载本地图片
- 使用Fresco加载图片
- Fresco图片加载
- Fresco图片加载框架
- php
- 翻转单词顺序列
- 删除web项目中的自动产生的一些文件的测试
- cuda 数组元素个数大于线程数目
- Python爬虫-正则表达式
- Fresco 加载网络图片被裁剪
- #46. 【清华集训2014】玄学
- js面向对象编程
- electron 构建桌面应用
- Toolbar相关知识点记录
- 调整数组顺序使奇数位于偶数前面
- C语言复习 第一波 进制转换代码
- 如何准备BAT技术面试答案(上)——Java研发方向
- Lottie