(a) Usually Javadoc template annotation generation method:
Enter/**<ENTER> on the line above the function name, and automatically generate the following annotation format:
/**
* Here's a quick introduction to function functions
* @param
* @param
* @return
*/
(ii) Generate Javadoc:
Click on the Android Studio menu bar tools->generate javadoc-> Select whole project or custom scope-> Select output Directory as the Javadoc build location->ok.
Note: If you are prompted for an encoding error, enter the following command line arguments:-encoding utf-8-charset Utf-8
According to the above method, the basic Javadoc can be generated.
If you want to customize the annotation template, refer to the following:
Http://www.jb51.net/article/69923.htm
That
1.file-> setting->editor->live Templates
2. Click + to create a template group, enter the group name
3. Select the group you just created to create the live Template
4. Fill in the abbreviation, I filled in here is CMT, that is, you this note shortcut, you knock CMT Plus Enter, the template is out
Templates text is a template for comments, specific to how you want to write the template can be, my template is as follows:
/**
*〈 A brief statement of the function of a sentence
*〈 Function Detail Description
* @param[parameter 1] [parameter 1 description]
* @param[Parameter 2] [parameter 2 description]
* @return[Return type description]
* @exception/throws[Type of violation] [description of violation]
* @see[Class, Class # method, Class # member]
*/
5. to set up your CMT shortcut key where it takes effect, my choice is in the declaration (java-declaration) in effect, that is, you in the method name of the CMT plus carriage return on it.
6. Click Apply to finish.
This article is from the "whatever957" blog, make sure to keep this source http://whatever957.blog.51cto.com/6835003/1791913
Authoring of Android Studio document Javadoc and custom annotation templates