设置Button按钮上面圆角下面直角
来源:互联网 发布:mysql获取union条数 编辑:程序博客网 时间:2024/05/01 14:32
<?xml version="1.0"encoding="UTF-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<solid
android:color="#151104"/>
<corners
android:bottomLeftRadius="0dip"
android:bottomRightRadius="0dip"
android:topLeftRadius="5dip"
android:topRightRadius="5dip"/>
</shape>
</item>
<item
android:bottom="1dp"
android:right="1dp"
android:top="1dp"
android:left="1dp">
<shape>
<gradient
android:startColor="#eb6b00"
android:centerColor="#ef8000"
android:endColor="#f49500"
android:type="linear"
android:angle="90"
android:centerX="0.5"
android:centerY="0.5"/>
<padding
android:left="2dp"
android:top="2dp"
android:right="2dp"
android:bottom="2dp"/>
<corners
android:bottomLeftRadius="0dip"
android:bottomRightRadius="0dip"
android:topLeftRadius="5dip"
android:topRightRadius="5dip"/>
</shape>
</item>
</layer-list>
在实现Button圆角的设计上,主要是采用的是layer-list中的<corners>标签,该标签就是用来设置圆角的,在之前使用时,只是知道使用android:radius属性,该属性相当于就是把Button按钮的四个角都设置了圆角,而如果我们想实现上面圆角、下面直角,那么单纯的使用android:radius是不能实现的,因此必须明确的知道其实Button对应的四个角都是有相对应的设置属性的,分别是bottomLeftRadius、buttonRightRadius、topLeftRadius、topRightRadius四个属性。
- 设置Button按钮上面圆角下面直角
- android上面圆角,下面直角 ImageView
- Android 自定义上面圆角下面直角的ImageView
- 安卓自定义上面圆角下面直角的RoundCornerImageView
- Android实现Imageview上面圆角下面直角效果
- android ImageView实现上面圆角下面直角(xml实现方法)
- android ImageView实现上面圆角下面直角(自定义view实现)
- 安卓imageview实现上面两个圆角下面两个直角的效果
- Bootstrap 按钮圆角改成直角
- Button按钮圆角的设置:
- Android实现button一边圆角一边直角
- Android实现button一边圆角一边直角
- android 客户端学习-给button按钮设置圆角
- [视图]上面带描边的圆角,底部不描边的直角 按键xml 去局部描边
- bitmap分别设置四角,圆角还是直角,自定义
- iOS 将控件设置为一边圆角一边直角
- Android 实现一边圆角一边直角的Button等View
- Android 圆角按钮BUTTON
- 排序方法
- Apache 设置最大并发数
- socket通信简介
- 伪静态 URL 重写
- 学生谈对Mybatis的理解
- 设置Button按钮上面圆角下面直角
- Http get和post的区别
- Typedef & # define
- oracle sql 中的save命令
- tomcat启动项目被重新加载,导致资源初始化两遍
- 浅谈WebLogic和Tomcat
- webpack 开发环境与线上环境的配置
- 各种提示框设计
- Python中dict转为object