SimpleDraweeView 设置圆角不生效问题
采用的是xml配置 roundedCornerRadius 参数方法
adverPic.setImageURI("http://xx.xx.xx.xx/123.jpg");
设置control 也无效。
解决办法:
RoundingParams roundingParams = new RoundingParams();
roundingParams.setCornersRadius(ScreenUtil.dpToPx(getResources(),15));
GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(getResources());
GenericDraweeHierarchy hierarchy = builder.build();
hierarchy.setRoundingParams(roundingParams);
adverPic.setImageURI(GlobalParams.gInitInfoEntity.getModel().getImage_url() + adverEntity.getImage_url());
adverPic.setHierarchy(hierarchy);
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/img_ad_pic"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginRight="6dp" />
SimpleDraweeView 设置圆角不生效问题的更多相关文章
- [问题解决]Fresco设置圆角效果不生效问题探究
[问题解决]Fresco设置圆角效果不生效问题探究 /** * Created by diql on 2017/2/21 11:07:04. */ 问题 在View中设置: fresco:rounde ...
- iOS之分别使用代码和storyboard、xib为控件设置圆角(以按钮为例)
首先我们看一下代码是如何给按钮设置圆角的: 我们再来看看如何在storyboard或xib中给按钮设置圆角: 1.在storyboard或xib中添加按钮后,设置标题和背景色,做好约束: 2.点击 S ...
- iOS UIView设置圆角
UIView设置圆角 1.比较简单的情况,UIView四个角都是圆角: UIView *aView = [[UIView alloc] init]; aView.frame = CGRectMake( ...
- iOS设置圆角矩形和阴影效果
1.设置圆角矩形 //设置dropview属性 _dropView.backgroundColor=[[UIColor whiteColor] colorWithAlphaComponent:0.8] ...
- iOS之用xib给控件设置圆角、边框效果
xib中为各种控件设置圆角 通过代码的方式设置 @interface ViewController () @property (weak, nonatomic) IBOutlet UIView *my ...
- Java 图片设置圆角(设置边框,旁白)
/** * 图片设置圆角 * @param srcImage * @param radius * @param border * @param padding * @return * @throws ...
- iOS图片设置圆角
一般我们在iOS开发的过程中设置圆角都是如下这样设置的. imageView.clipsToBounds = YES; [imageView.layer setCornerRadius:]; 这样设置 ...
- iOS设置圆角的常用方法
//第一种方法:最常用的方法,但是性能最差 UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(100, 100 ...
- iOS设置圆角的方法及指定圆角的位置
在iOS开发中,我们经常会遇到设置圆角的问题, 以下是几种设置圆角的方法: 第一种方法: 通过设置layer的属性 代码: UIImageView *imageView = [[UIImageView ...
随机推荐
- HTML框架标签的使用-<frameset>
<html> <head> <title> frameset框架的使用-使用frameset框架进行布局 </title> <!-- 标签名称:f ...
- 【Unity】9.2 如何添加粒子组件
分类:Unity.C#.VS2015 创建日期:2016-05-02 一.简介 粒子系统是作为组件附加到游戏对象上的,有两种添加办法. 二.方式1--添加已制作好的预制体 第1种方式是直接添加已经制作 ...
- UIViewContrller之间切换的几种方式
转自:http://blog.csdn.net/likendsl/article/details/7542296 1.UIViewContrller之间的切换有三种方式: 一.UIView ...
- 使用jquery插件ajaxfileupload一次上传多个文件,示例
@{ ViewBag.Title = "Index"; Layout = ""; } <!DOCTYPE html PUBLIC "-//W3C ...
- 深入云存储系统Swift核心组件:Ring实现原理剖析
http://www.cnblogs.com/yuxc/archive/2012/06/22/2558312.html 简介 OpenStack是一个美国国家航空航天局和Rackspace合作研发的开 ...
- python __name__ = '__main__' 的作用
很多新手刚开始学习python的时候经常会看到python 中__name__ = \'__main__\' 这样的代码,可能很多新手一开始学习的时候都比较疑惑,python 中__name__ = ...
- linux如何查看一个进程的堆栈
转自:http://blog.csdn.net/nanjingligong/article/details/8624739 方法一:pstack pidNAME pstack - prin ...
- win10下安装redis 服务
Window 下安装 下载地址:https://github.com/MSOpenTech/redis/releases Redis 支持 32 位和 64 位.这个需要根据你系统平台的实际情况选择, ...
- 【C/C++】关于隐式转换·面试题分析
题目 以下两个程序片段A 和B ,问哪个能进入循环? 片段A: unsigned short i; unsigned ; ; i < index-; i++) { ........ } 片段B: ...
- 关于electron的跨域问题,有本地的图片的地址,访问不了本地的图片
项目中有上传图片功能,自定义input type=file 改变透明度和超出部分隐藏,把按钮和 点击的图标放在上传文件的按钮上面,然后又碰到到获取input里面的图片的本地的路径, 在electron ...