Kenny Seyffarth
Kenny Seyffarth

Reputation: 1016

Documentation for styles in android resources

I tried to add a documentation to some styles in my code. The issue is, that android studio doesn't link the documentation directly to a usage of the style.

I mean, the simple <!-- Docu --> comment doesn't create my desired documentation for the style.

<!-- Documentation -->
<style name="graph" parent="font_graph_base"/>

Here is what i want, as an example for a view attribute: View attribute example

This is what i get, if i use the simple <!-- --> comment, what i want is to fill this documentation. Current state...

Is there a way to get this working?

Upvotes: 15

Views: 427

Answers (1)

Kevin van Mierlo
Kevin van Mierlo

Reputation: 9804

Okay, I did a lot of searching for this but I'm gonna have to disappoint you. I don't think there is a way to do this. Even the styles used by Android don't have documentation. I think the only thing you can do is put comments above and just navigate to the style to see your comment.

However you can use comments as documentation with attributes (attr). If you have attributes you just put a normal comment <!-- --> above it and it would appear as documentation. You even have ways to suppress that comment using <eat-comment/>.

Upvotes: 3

Related Questions