Android:res之shape制作圆角、虚线、渐变
来源:互联网 发布:淘宝直播如何开通 编辑:程序博客网 时间:2024/06/05 20:56
xml控件配置属性
android:background="@drawable/shape"
标签
corners ----------圆角gradient ----------渐变padding ----------内容离边界距离size ------------大小 solid ----------填充颜色stroke ----------描边
注意的是corners的属性bottomLeftRadius为右下角、bottomRightRadius为左下角
shape制作圆角
<Button android:layout_width="160dp" android:layout_height="wrap_content" android:background="@drawable/button_shape" android:text="圆角按钮" /><?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="#fff"/> <padding android:top="10px" android:bottom="10px"/> <corners android:radius="16px"/> <stroke android:width="1px" android:color="#000"/></shape>shape制作虚线<View android:layout_width="match_parent" android:layout_height="5px" android:layout_marginTop="10dp" android:background="@drawable/line_shape" /><?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="line" > <stroke android:dashGap="3dp" android:dashWidth="8dp" android:width="1dp" android:color="#63a219" /> <size android:height="1dp" /></shape>shape制作渐变<View android:layout_width="match_parent" android:layout_height="50dp" android:layout_marginTop="10dp" android:background="@drawable/gra_shape" /><?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" > <gradient android:angle="270.0" android:endColor="#ffffff" android:startColor="#000000" /></shape>
阅读全文
0 0
- Android:res之shape制作圆角、虚线、渐变
- Android shape的使用实现圆角,虚线,渐变等效果
- Android shape的使用实现圆角,虚线,渐变等效果
- Android shape的使用实现圆角,虚线,渐变等效果
- Android使用shape设置虚线、圆角、渐变
- android res之shape
- Android(安卓):res之shape的创建并制作
- Android之通过shape.xml制作渐变背景色
- Android之shape设置虚线无效果
- Android自定义资源之圆角按钮、变色按钮、渐变线条、虚线等等
- Android虚线分割Shape
- Android shape 画 虚线
- Android Shape绘制虚线
- Android虚线分割Shape
- Android 虚线、圆角、渐变
- Android中用shape做渐变,边框,圆角等效果
- android shape的应用之画一条虚线
- Android背景渐变[shape]
- 使用PhpMyAdmin远程可视化操作云服务器的MySQL数据库
- byte数组和long,int,short互相转换
- leetcode 190. Reverse Bits
- c++探究(三)指针
- Effective Java 类和接口 14.在公有类中使用访问方法而非公有域
- Android:res之shape制作圆角、虚线、渐变
- 深度学习时代的目标检测算法综述
- C++map的初始化
- C++中virtual(虚函数)的用法
- 朴素贝叶斯(Naive Bayes)
- SID和Application session 含义
- 【推荐】Springboot使用velocity模板引擎
- 221. Maximal Square
- 关于 IntelliJ IDEA 中 Schedule for Addition 的问题