我知道如何創建視圖自定義屬性,例如:如何將文檔添加到自定義屬性?
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="SomeViewsCustomAttrs">
<attr name="someAttr" format="dimension" />
<attr name="anotherAttr" format="boolean" />
</declare-styleable>
</resources>
我想知道如果有一種方法來添加文檔,這些自定義的attrs。在編輯XML編輯器中的佈局時,您可以獲取描述attrs的工具提示。例如,如果您正在鍵入android:layout_width=
它會給你以下信息,「指定視圖的基本寬度。[尺寸,枚舉]」
有沒有辦法爲你自己的attrs提供?
感謝
難道你有沒有找到答案呢? – drewhannay 2013-06-17 17:04:53
@drewhannay我放棄了尋找,還沒有找到任何東西。 – cottonBallPaws 2013-06-18 16:23:38