实现上半部分是直角,下半部分是圆角半圆角的效果
2016-01-08 00:00
316 查看
xml控件配置属性
标签
corners ----------圆角
gradient ----------渐变
padding ----------内容离边界距离
size ------------大小
solid ----------填充颜色
stroke ----------描边
下面是shape文件代码:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp"/>
<gradient android:angle="270"
android:endColor="@color/transparent_black_40"
android:startColor="@color/transparent_black_15"/>
</shape>
希望对大家有点帮助吧
android:background="@drawable/shape"
标签
corners ----------圆角
gradient ----------渐变
padding ----------内容离边界距离
size ------------大小
solid ----------填充颜色
stroke ----------描边
下面是shape文件代码:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:bottomLeftRadius="5dp"
android:bottomRightRadius="5dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp"/>
<gradient android:angle="270"
android:endColor="@color/transparent_black_40"
android:startColor="@color/transparent_black_15"/>
</shape>
希望对大家有点帮助吧
相关文章推荐
- 管理时间做更好的自己
- Nginx入门之静态资源与动态访问分离
- Nginx入门之负载均衡
- web项目下载TXT文件防止浏览器直接打开
- 厦门巨游网络科技有限公司(HOTPOWER)承接游戏UI外包
- Zbrush中菜单托盘如何使用
- Winform 自己做一个checkBox 控件
- 蜂窝教育Android培训 以真实商业项目塑造技术人才
- 自动化测试框架备忘
- Spring框架工作原理及其优缺点详解
- 我的面试经
- socket 设置阻塞超时
- Android Design Support Library(1)- FloatingActionButton的使用
- jsPlugin 解决Table中值相同的列进行rowlSpan合并
- R语言大数据分析平台RRE正式更名为Microsoft R Server
- nginx初探
- 线程、进程和协程
- 2016年学习计划
- request 获取各种路径
- linux下如何添加一个用户并且让用户获得root权限