XML 布局不会在 android studio 中换行 [英] XML layout doesn't line break in android studio

查看:39
本文介绍了XML 布局不会在 android studio 中换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新我的 android studio 后,布局编辑器中的 XML 格式被破坏了.最初,每个属性都在单独的一行上.然而现在两三个属性走一条线.

After I updated my android studio , the XML formatting is ruined in the layout editor. Initially each attribute was on a separate line. Now however two or three attributes take a line .

我进入了 Settings->Editor->CodeStyle->XML,在 Layout Files 区域下,我将 Wrap Attributes 设置为 Wrap Always,并检查了第一个属性后插入换行符.

I went into Settings->Editor->CodeStyle->XML and under the Layout Files region I have Wrap Attributes set as Wrap Always and Insert Line Break After First attribute is checked.

然而效果并没有出现.

有什么指点吗?

推荐答案

我曾经发生过.因为使用 Project Scheme .要解决此问题,请转到 Scheme Combo Box 上的 Preferences>>Code Style>>XML,更改为 Default IDE

I had occurred. Coz u r using Project Scheme . To fix this go Preferences>>Code Style>>XML on Scheme Combo Box , change to Default IDE

对我来说,我使用默认 IDE 将项目覆盖为 项目方案(您不喜欢的方案).选择设置图标并复制到项目.

For Me, I overwrite project to Project Scheme( one that u don't like) with Default IDE. select setting icon and Copy to Project.

完成后,使用 OK 关闭首选项窗格,然后就可以开始了.祝你好运!

After all finished, Close preference pane with OK ,And then u are good to go. Good Luck!

这篇关于XML 布局不会在 android studio 中换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆