在 Android Studio 中更改大括号的样式 [英] Changing the Style of Braces in Android Studio
本文介绍了在 Android Studio 中更改大括号的样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近开始使用 Android Studio.它默认使用这种风格的大括号:
I recently started to use Android Studio. It uses this style of braces by default:
public void scanFile(String filePath) {
}
我需要提交的代码需要样式如下:
The code I need to submit requires to be styled as follows:
public void scanFile(String filePath)
{
}
在哪里可以找到此设置?
Where can I find a setting for this?
推荐答案
需要在Project Settings
File -> Settings -> (Project Settings) -> Code Style -> Java -> Wrapping and Brances
将 Class
和 Method
声明的 Braces Placement
更改为 Next Line
Change the Braces Placement
for Class
and Method
declaration to Next Line
(或者,在 Mac 上,在 Preferences
中做同样的事情)
(Or, on a Mac, do the same thing in Preferences
)
这篇关于在 Android Studio 中更改大括号的样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文