Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create my own 'Reformat Code' style in Android Studio?

In Eclipse,(Window -> Preferences -> Java -> Code Style -> Formatter) there was a facility to create my own format style and apply it in the code. Is there a way to do that in Android Studio(for Java code) ?

like image 814
Tomin Jacob Avatar asked Oct 03 '14 15:10

Tomin Jacob


1 Answers

To change formatter options go to File | Settings | Code Style | Java

To reformat your code manually, press Ctrl + Alt + L (or using the menu Code | Reformat code...). To reformat the whole source code of your module, just select the module folder first.

More information about reformating source code can be found on the IntelliJ Web Help

like image 60
Darek Kay Avatar answered Mar 04 '23 00:03

Darek Kay