1:shape总结
1):shape文件是放置在drawable文件下的。res/drawable/filename.xml.
2):shape类型:android:shape。一共有四种:rectangle,oval,line,ring。
3):corners标签:定义圆角。当且仅当控件类型位rectangle时才有作用。android:radiuse位圆角的半径。当然也...
分类:
移动开发 时间:
2014-10-06 18:07:10
阅读次数:
308
当然除了使用drawable这样的图片外今天谈下自定义图形shape的方法,对于Button控件Android上支持以下几种属性shape、gradient、stroke、corners等。 我们就以目前系统的Button的selector为例说下:Java代码对于上面,这条shape的定义,分别为...
分类:
移动开发 时间:
2014-09-30 16:34:39
阅读次数:
238
无标题文档 Test passes if there is a box with rounded corners below. Filler Text behavior: url(../js/PIE.htc);这个引用htc文件的,指的是html页面相对于这个htc文件的...
分类:
Web程序 时间:
2014-09-24 16:35:47
阅读次数:
234
需求:自定义Button,使用系统自定义Shape;效果图:1.默认状态2.选中状态实现分析:1.目录结构:代码实现:1.button_normal.xml 2.button_select.xml solid:实心,就是填充的意思corners:圆角android:rad...
分类:
其他好文 时间:
2014-09-01 12:14:13
阅读次数:
284
第四章:Visual EffectsRounded Corners例子4.1cornerRadius源码在这里下载:http://www.informit.com/title/9780133440751[objc]view plaincopyprint?#import"ViewController....
分类:
移动开发 时间:
2014-08-23 15:13:21
阅读次数:
340
There is an 8*8 chess board in which two diagnolly opposite corners have been cut off. You are given 31 dominos, and a single domino can cover exactly...
分类:
其他好文 时间:
2014-08-20 12:01:32
阅读次数:
236
xml控件配置属性android:background="@drawable/shape"标签corners ----------圆角gradient ----------渐变padding ----------内容离边界距离size ------------大小 solid ----------....
分类:
移动开发 时间:
2014-08-13 21:47:27
阅读次数:
273
所需图片: corners-type1 corners-type2 corners-type3 corners-type4 corners-type5 roundedbox-type5-bgPrevie of...
分类:
Web程序 时间:
2014-08-08 17:53:06
阅读次数:
340
Android 3.0 之前圆角定位是上下相反,Android 4.0 之后就是相同的了故要兼容两个版本就需要在Res目录下面创建一个drawable-v12文件夹,该文件夹是兼容3.0以后的样式存放地3.0 以后写法 3.0及3.0一起的方法
分类:
移动开发 时间:
2014-08-07 12:55:29
阅读次数:
234
Android里面经常会使用shape来定制一些View的背景
可以修改View的背景颜色,形状等属性
一般情况下,shape都是在xml文件里面写死了,今天遇到一个需求,View的形状是圆角的,但是颜色是在代码里面设置的
最开始的思路是先在代码里给View设置颜色,再在shape里面设置solid属性为透明色
<corners
android:topL...
分类:
其他好文 时间:
2014-07-19 23:37:30
阅读次数:
448