您的位置:首页 > 移动开发 > Android开发

Android中attrs属性复用

2016-05-30 11:01 986 查看
<resources>
<!--声明公共属性-->
<attr name="radius" format="dimension" />
<attr name="topLeftRadius" format="dimension" />
<attr name="topRightRadius" format="dimension" />
<attr name="bottomRightRadius" format="dimension" />
<attr name="bottomLeftRadius" format="dimension" />

<declare-styleable name="ShapeButton">
<attr name="solidColor" format="color" />
<attr name="strokeColor" format="color" />
<attr name="strokeWidth" format="dimension" />
<attr name="radius"/>
<attr name="topLeftRadius"/>
<attr name="topRightRadius"/>
<attr name="bottomRightRadius"/>
<attr name="bottomLeftRadius"/>
</declare-styleable>

<declare-styleable name="SelectorButton">
<attr name="radius"/>
<attr name="topLeftRadius"/>
<attr name="topRightRadius"/>
<attr name="bottomRightRadius"/>
<attr name="bottomLeftRadius"/>
</declare-styleable>
</resources>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android