本文介绍了改变大括号的风格Android的工作室的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近开始使用Android工作室。它在默认情况下使用这种风格的括号:

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

public void scanFile(String filePath) {

}

在code我需要提交要求将样式如下:

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?

推荐答案

您需要更改code风格的项目设置

You need to change the code style in Project Settings

File -> Settings -> (Project Settings) -> Code Style -> Java -> Wrapping and Brances

更改大括号放置方法声明下一行

(或者,在Mac上,做同样的事情在 preferences

(Or, on a Mac, do the same thing in Preferences)

这篇关于改变大括号的风格Android的工作室的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 19:38