Changing braces style in Android Studio

I recently started using Android Studio. It uses this default brace style:

public void scanFile(String filePath) { } 

The code I need to send should be written as follows:

 public void scanFile(String filePath) { } 

Where can I find the setting for this?

+44
android android-studio
Apr 18 '14 at 2:54 on
source share
2 answers

You need to change the code style in Project Settings

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

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

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

enter image description here

+81
Apr 18 '14 at 3:00
source share

This worked for me in Android Studio 3.0 Beta 7

Reposition Shapes in Android Studio 3

+1
Oct 23 '17 at 14:45
source share



All Articles