摘要: 1.在res/values下创建attrs.xml MyRadioButton为组件名字,随意起,attr标签定义组件的属性,name对应的是属性名,format是属性的类型,具体可参见《[Android]attrs.xml文件中属性类型format值的格式》。2.在自定义的组件中使用attrs.xml文件的定义public class MyRadioButton extends RadioButton { private String url; public MyRadioButton(Context context, AttributeSet attrs... 阅读全文
posted @ 2013-11-08 10:27 道奇兔 阅读(596) 评论(0) 推荐(0)