Changing the Style of Braces in Android Studio

Solution 1:

You need to change the code style in Project Settings

File -> Settings -> (Project Settings) -> Code Style -> Java -> Wrapping and Brances

Change the Braces Placement for Class and Method declaration to Next Line

(Or, on a Mac, do the same thing in Preferences)

enter image description here

Solution 2:

This one worked for me in Android Studio 3.0 Beta 7

change braces placement in Android Studio 3