自定义控件
文章平均质量分 73
zhouli_csdn
热爱It
展开
-
自定义属性format详解
reference:参考某一资源ID。(1)属性定义: <declare-styleable name = "名称"> <attr name = "background" format = "reference" /> </declare-styleable> (2)属性使用: <ImageView android:layout_wid转载 2015-06-15 17:18:33 · 1118 阅读 · 0 评论 -
自定义view(一)
转载请注明出处:http://blog.csdn.net/ZhouLi_CSDN/article/details/46504881自定义属性使用步骤: 1. 通过<declare-styleable>为自定义View添加属性2. 在xml中为相应的属性声明属性值3. 在运行时(一般为构造函数)获取属性值4. 将获取到的属性值应用到View 在res/values目录下创建attr.xml文件 <?x原创 2015-06-15 16:14:45 · 2010 阅读 · 0 评论