我知道如何为视图创建自定义属性,例如:
<?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>
我想知道是否有一种方法可以为这些自定义属性添加文档。在XML编辑器中编辑布局时,您可以获取描述属性的工具提示。例如,如果您正在输入android:layout_width=
,它将提供以下信息:“指定视图的基本宽度。[dimension,枚举]”。
是否有办法为自己的属性提供类似的文档?
谢谢