0leg
0leg

Reputation: 14144

Android Studio: Wrong line comment indentation

When hitting Ctrl+/ Android Development Studio would put line comment double slashes at the beginning of the line.

Is there any way to make ADS put line comment preserving correct indentation?

Upvotes: 9

Views: 1677

Answers (2)

Victor Choy
Victor Choy

Reputation: 4246

If you use kotlin, please remember to modify the setting of Kotlin, not Java.

Upvotes: 0

jgrocha
jgrocha

Reputation: 3032

You have to go to Settings → Editor → Code Style → JAVA. Select "Code Generation" tab.

Deselect "Line comment at first column" option, on Comment Code section.

enter image description here

This answer is based on Android Studio 2.3.

Upvotes: 14

Related Questions