什么是属性集中的在Android的?
What is AttributeSet in Android?
我如何使用它为我的自定义视图?
How can i use it for my custom view?
AttributeSet中的是一组在XML资源文件中指定的属性。你不应该在你的自定义视图做什么特别的。该视图(上下文的背景下,ATTRS的AttributeSet)
被调用来初始化从布局文件的视图。就在这个构造函数添加到您的自定义视图。退房的Custom查看比如在SDK中看到它。
AttributeSet is the set of properties specified in an xml resource file. You shouldn't have to do anything special in your custom view. The View(Context context, AttributeSet attrs)
gets called to initialize a view from a layout file. Just add this constructor to your custom view. Check out the Custom View example in the SDK to see it used.
上一篇:如何连接在机器人XML多个字符串?多个、字符串、机器人、XML
下一篇:Android的XML错误:[否资源的发现,匹配给定的名称和QUOT;与RelativeLayout的(@ ID / LinearLayout_acc,@ ID / ProgressBar_statu