rounded corners

Android 图片设置圆角

限于喜欢 提交于 2020-11-08 23:11:39
  Android中经常会遇到对图片进行二次处理,例如加圆角,或者显示圆形图片 方法一:   通过第三方框架Glide实现图片显示有圆角,有三种写法如下:   1.1,第一种实现:   RequestOptions options = new RequestOptions().error(R.drawable.img_load_failure).bitmapTransform(new RoundedCorners(30));//图片圆角为30   Glide.with(this).load(URL) //图片地址   .apply(options)   .into(ImagView);   1.2,第二种实现:   RequestOptions requestOptions = new RequestOptions();   requestOptions.placeholder(R.drawable.ic_launcher_background);   requestOptions.circleCropTransform();   requestOptions.transforms( new RoundedCorners(30));   Glide.with(this).load(URL) //图片地址   .apply(options)   .into(ImagView);  

给UIView圆角

随声附和 提交于 2020-08-11 04:27:02
问题: My login view has a subview which has a UIActivityView and a UILabel saying "Signing In…". 我的登录视图有一个子视图,它有一个 UIActivityView 和一个 UILabel 写着“Signing In ...”。 This subview has corners which aren't rounded. 此子视图的拐角不是圆角。 How can I make them round? 我怎样才能让它们成圆形? Is there any way to do it inside my xib? 有没有办法在我的xib中做到这一点? 解决方案: 参考一: https://stackoom.com/question/6KhX/给UIView圆角 参考二: https://oldbug.net/q/6KhX/Giving-UIView-rounded-corners 来源: oschina 链接: https://my.oschina.net/u/3797416/blog/4422406