选择代码格式时禁用行限制换行

Disable the line limit wrap when Code Format is selected

最近我将我的行长度 限制设置为 100 或 120 并且我还 启用了一个选项来包装超过这些的代码 每当我单击代码格式时,限制到下一行。

现在我想禁用该换行并手动执行,但我不知道该设置在哪里。

转到文件->设置->编辑器->代码风格

在那里你会找到两个选项 "Right margin (columns)" 和 "Wrap when typing reaches right margin"。

在 Android 工作室前往

Preferences > Editor > Code Style > Java > Wrapping and Braces > Keep when reformatting and uncheck the checkbox Line Breaks