Make brackets automatic start new line

心已入冬 提交于 2019-12-11 14:14:23

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!