Change Author template in Android Studio

Shudy picture Shudy · Jan 16, 2014 · Viewed 81.5k times · Source

I want to change the automatic author that appears when I create a file in AndroidStudio.

/**
 * Created by a556520 on 16/01/14.
 */
public class POI {

The author takes 'a556520' but I want that appears my name, and not the number of employee. Is that possible? I didn't find in the settings.

Answer

AZ13 picture AZ13 · Jan 16, 2014

You can overwrite the ${USER} variable in the template file with the

#set( $VARIABLE = "value")

function. Go to Settings -> Editor -> File and Code Templates -> Includes -> File Header prepend the #set() function call, for example:

#set( $USER = "Your name" )
/**
* Created by ${USER} on ${DATE}.
*/