Reputation: 1809
I need to update my code style. Reformatting the whole project files one by one takes too much effort with the shortcuts I know.
Opt + Command + L
Is there any other way to do it for the whole project?
Upvotes: 84
Views: 17811
Reputation: 8262
Use the re-format code shortcut (default: ⌘ + Opt + L
(Mac) / Ctrl + Alt + L
(PC)) in the Project Files View/Explorer on the desired root folder(s) and then check Include subdirectories
.
Upvotes: 173
Reputation: 2774
This is how it works in Android Studio 3.5
Right click in your project or lib -> Reformat Code
See the image below:
Select what you want (clean up code will reformat your code)
Wait until the progress finish.
that's it!
Good coding!
Upvotes: 16