【发布时间】:2013-04-11 08:12:38
【问题描述】:
我想在我的项目中使用自定义组件,我想将它添加到枚举属性中,如下所示,我该怎么做?
<com.abb.abbcustomcompanents.buttons.AbbButton
android:id="@+id/abbBtn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:Type="How can i use enum here"
/>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="abbButton">
<attr name="Type" format="enum"/>
<attr name="onAction" format="string"/>
</declare-styleable>
</resources>
谢谢!
【问题讨论】:
-
谢谢这是可以接受的答案!如果您将其写为答案,我可以将其标记为已接受。
标签: android android-layout android-custom-view