问题
Sorry if I was not able to describe in the title how I like to do; I know that in AndroidStudio there is a way to use this brackets notation
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
instead this
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
In other words I like that the first bracket of any method, class etc starts a new line. I know that it is possibile in preferences > editor but I'm not able to remember how I have to change. Thanks a lot and sorry for the stupid question.
回答1:
File | Settings | Editor | Code Style | Java | Wrapping and Braces | Braces Placement
Change "End of Line" to "Next Line"
来源:https://stackoverflow.com/questions/32641275/make-brackets-automatic-start-new-line