设置ImageView形状成圆角矩形和纯圆形
2015-12-02 10:55
381 查看
纯圆形:
圆角矩形
将图片ps成圆形,加载进去也可以
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" android:useLevel="false"> <solid android:color="#66CC00"/> <size android:width="50dp" android:height="50dp"/> </shape>
圆角矩形
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape> <corners android:radius="50dip" /> <gradient android:angle="270" android:centerColor="#aa3399CC" android:centerY="0.75" android:endColor="#aa7476ff" android:startColor="#aa6699CC" /> </shape> </item> </layer-list>
将图片ps成圆形,加载进去也可以
相关文章推荐
- 自己实现的字符串操作函数
- [ios][switf]页面跳转
- jetty部署出现org.apache.jasper.JasperException: PWC6345: There is an error in invoking javac. A full JD
- Leetcode--Lowest Common Ancestor of a Binary Search Tree
- Maven学习总结(八)——使用Maven构建多模块项目
- js数组去重复
- mac 给vim 配色
- Android逆向分析必备网址大全
- hiho刷题日记——第二十八天题外话·堆
- Spinner( 微调) 组件
- 252. Meeting Rooms
- LeetCode 20 : Valid Parentheses (Java)
- Leetcode日记(3)---Longest Substring Without Repeating Characters
- http原理介绍(1)
- Notification的icon大小
- php soap简单实现
- java项目——启动tomcat出现错误
- UEFI 、GPT 分区安装 Windows10
- Maven学习总结(七)——eclipse中使用Maven创建Web项目
- vector容器的三种遍历方法