4

Is it possible to define the stylable attributes as required? (as in XSD schemas)

<declare-styleable name="PieChart">
    <attr name="name" format="string" use="required"/>
</declare-styleable>    

The above XML does not work, is there another syntax to achieve it?

4

1 回答 1

0

如果在 attr 值为 null 的情况下在构造函数中抛出异常怎么办?

于 2013-04-22T13:50:54.757 回答