I'm used to write code in a such way:
private String blabla()
{
return "bla";
}
But Android Studio is adjusted for this code:
private String blabla() {
return "bla";
}
Question: how can I change this option for me?
I'm used to write code in a such way:
private String blabla()
{
return "bla";
}
But Android Studio is adjusted for this code:
private String blabla() {
return "bla";
}
Question: how can I change this option for me?
Go to File -> Settings.
Then in dialog, Editor -> Code Style -> Java -> Wrapping and Braces tab, then you can adjust braces placement
Remember to "Apply" your changes.
The accepted answer is correct. However, it seems the path may have changed just a little bit, I am using Android Studio version 3.3.2 for Windows.
The path is: File > Settings (Ctrl + Alt + S) > Editor > Code Style > Java.
Then select your relevant tab. In this case is was the Wrapping and Braces tab. I wanted to set some naming conventions the other day so I selected the Code Generation tab.
In Android Studio 4.
File > Settings > Editor > Code Style > "Select the programing languae" > set Line length: 300. for example