码迷,mamicode.com
首页 > 移动开发 > 详细

疯狂android 的一些笔记

时间:2015-03-12 18:41:59      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:

shape用于设定形状,可以在selector,layout等里面使用,有6个子标签

更详细:http://www.cnblogs.com/cyanfei/archive/2012/07/27/2612023.html

技术分享
 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <shape xmlns:android="http://schemas.android.com/apk/res/android">
 3     <!-- solid 实心  填充的意思-->
 4     <solid android:color="#0000"/>
 5 
 6     <!-- gradient 渐变
 7     ndroid:angle是渐变角度,必须为45的整数倍
 8 
 9      -->
10     <gradient android:startColor="#ff51ffe7"
11                android:endColor="#7ff"
12                android:type="linear"
13                android:angle="270"
14             />
15     <!--stroke 描边
16     android:dashWidth="5dp"
17     android:dashGap="3dp 是虚线。
18     -->
19     <stroke android:color="#ffff6441" android:width="2dp"/>
20 
21     <!--圆角-->
22     <corners android:radius="20dp"/>
23 
24     <!--间隔padding-->
25     <padding
26             android:left="10dp"
27             android:right="10dp"
28             android:bottom="10dp"
29             android:top="10dp"
30             />
31 </shape>
View Code

 

疯狂android 的一些笔记

标签:

原文地址:http://www.cnblogs.com/tom987690183/p/4333096.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!