Changing the Style of Braces in Android Studio

前端 未结 2 1479
春和景丽
春和景丽 2021-01-30 15:57

I recently started to use Android Studio. It uses this style of braces by default:

public void scanFile(String filePath) {

}

The code I need

相关标签:
2条回答
  • 2021-01-30 16:21

    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

    0 讨论(0)
  • 2021-01-30 16:33

    This one worked for me in Android Studio 3.0 Beta 7

    0 讨论(0)
提交回复
热议问题