简体   繁体   中英

Android studio code formatting not following the settings

I want to copy my project to another directory on my windows 10 PC but whenever I copy the project and open it from the other directory the code formatting settings do not apply to the code formatting. Whenever I format my code with the code formatting shortcut(ctrl + alt + L) the tabbing is turned to 1 space and the code becomes very hard to read. Changing the settings or resetting them to default does not change anything. I also tried to replace the files for code styles but that also does not work. What would you suggest me to do?

AndroidStudio should be the same as IntelliJ IDEA. There you can override formatter settings in Settings -> Editor -> Code Style . There you can set Tab size and Indent (I personally suggest 4 spaces).

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