如何在Android Studio中对齐XML代码?
问题描述:
Android Studio中是否有任何功能可以通过"="符号对齐所有XML属性.我找不到任何允许这样做的设置.
is there any feature in Android Studio to align all XML attributes by '=' sign. I am unable to find any setting that would allow this.
只是另一个喜欢代码可读性的代码格式狂热者.
Just another code format fanatic who likes code readability.
答
下面的代码将对齐所有内容,但不包括=符号.以获得更好的答案此处
below code will align everything but not after = sign. for better answer here
Win/Linux:
Win/Linux:
Ctrl + Alt + L
Ctrl + Alt + L
Mac:
Option + Command + L
Option + Command + L