How to format code in Android Studio (IntelliJ)

Yoda picture Yoda · Mar 14, 2014 · Viewed 79.6k times · Source

I want to format code in a freshly created Android application.

I messed up the code in this manner:

 private static final
    int AUTO_HIDE_DELAY_MILLIS
            = 3000;

I want to format it with ctrl+alt+L but it is not repairing the code. I use Windows 8.1.

Answer

IgorGanapolsky picture IgorGanapolsky · Feb 10, 2015

Just right-click on the project or directory, and select Reformat Code Reformat Code