Thursday, 12 September 2013

Adding documentation to layout file

Adding documentation to layout file

I'm looking for a way to document a layout file to improve its
reusability. What I'd like is something that produces javadoc in generated
R file like this.
I know it is possible to do so when using <declare-styleable>. This :
<declare-styleable name="myStyleable">
<!-- Some comment -->
<attr name="someAttr" format"color" />
</declare-styleable>
Produces this output i'd like to obtain for layout files without success :
public final class R {
/** Some comment */
public static final int someAttr...
}
Does someone know of the mean to achieve this ? I'm interrested in :
Documenting the layout file, so that documentation be available when using
R.layout.my_layout
Documenting a particular element of the file, so that the documentation be
available when finding it by id f.e.
aView.findViewById(R.id.the_id_that_is_documented)

No comments:

Post a Comment