How to align XML code in Android Studio?

2019-02-19 05:38发布

问题:

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.

回答1:

below code will align everything but not after = sign. for better answer here

Win/Linux:

Ctrl + Alt + L

Mac:

Option + Command + L



回答2:

Try like this

Settings - Editor - XML