I recently started to use Android Studio. It uses this style of braces by default:
public void scanFile(String filePath) { }
The code I need
You need to change the code style in Project Settings
Project Settings
File -> Settings -> (Project Settings) -> Code Style -> Java -> Wrapping and Brances
Change the Braces Placement for Class and Method declaration to Next Line
Braces Placement
Class
Method
Next Line
(Or, on a Mac, do the same thing in Preferences)
Preferences