简体   繁体   中英

Android studio is reformatting my comments when I use CTRL ALT + L

How do I prevent Android Studio from formatting my comments and only my code? I've been trying to search a solution for this on Google and using the Find Action key, but I haven't been able to find a solution.

You may need to enable the preference first: In IntelliJ Preferences, under Code Style, General, Formatter Control there is a checkbox "Enable formatter markers in comments" 您将在android stdio上看到这些选项

Now for more description you can see :- How to disable code formatting for some part of the code using comments?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM