how to auto format codes in android studio code example Example: auto format android studio Cmd+Alt+L (on Mac) Ctrl+Alt+L (on Windows and Linux)