自定义shape
来源:互联网 发布:扣扣闪图制作软件 编辑:程序博客网 时间:2024/05/16 12:50
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <!-- 圆角 --> <corners android:radius="5dp" /> <!-- 渐变色 <gradient android:startColor="#000000" android:centerColor="#888888" android:endColor="#ffffff" /> --> <!-- 填充色 --> <solid android:color="#000000"/> <!-- 描边 width: 描边的宽度 color: 描边的颜色 --> <stroke android:width="1px" android:color="#ff0000" /></shape>
selector
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" //被点击 <item android:state_pressed="true" android:drawable="@drawable/shape"></item> //默认 <item android:drawable="@drawable/shape2"></item></selector>
使用方式
<Button android:layout_margin="30dp" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="看看" android:background="@drawable/selector" android:layout_alignParentBottom="true" />
0 0
- 自定义Shape
- 自定义shape
- 自定义Shape
- 自定义Shape
- 自定义shape
- 自定义drawable(shape)
- android 自定义button shape
- Android 自定义shape selector
- 自定义drawable(shape)
- 自定义drawable(shape)
- 自定义drawable(shape)
- Android 自定义图形 shape
- android 自定义shape
- 自定义ImageView 圆角shape
- Android中自定义shape
- 自定义drawable android:shape
- 自定义一个图片shape
- Android自定义shape资源
- iOS开发实践之UIWebView
- 设计模式六大原则
- C#学习笔记(二)变量
- Fragment android碎片化管理
- 链表之单链表约瑟夫问题(一)
- 自定义shape
- NSMutableString 使用
- Flask Web开发背景介绍及环境配置
- Random Walk for Image Segmentation 论文笔记
- 闪存浪潮下不得不知的知识(2)-颗粒篇
- 测试 __try, __finally, __except
- 选择排序
- 通过C#代码实现空间离散点的克里金(kriging)插值(一) 计算原理
- android之旅17 四大组件之服务基本概念