Android Studio: how to remove/update the “Created by” comment added to all new classes?

后端 未结 9 1389
余生分开走
余生分开走 2020-12-07 07:53

By default Android Studio automatically adds a header comment to all new classes, e.g.

/**
 * Created by Dan on 11/20/13.
 */

Where is the

9条回答
  •  我在风中等你
    2020-12-07 08:18

    Change Android Studio File Header Template

    Step 1: First hover over the File Header and get the yellow lightbulb and the menu out of it by clicking on it as shown in the following screenshot:

    Step 2: Then click on the Edit template menu item and get the following pop-up window:

    Note: In its Description area there are many other available Template variables, you can use them too.

    Step 3: In the editor area add your name as shown in the following screenshot and click "OK" button and the current file and the future new class file headers will be generated accordingly.

    Hope this answer will be helpful to somebody else out there! :-) Cheers! (This works on Android Studio 2.2 (September, 2015) version.)

提交回复
热议问题