Daksharma
Daksharma

Reputation: 599

How to align XML code in Android Studio?

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.

un-aligned aligned
Just another code format fanatic who likes code readability.

Upvotes: 4

Views: 8658

Answers (2)

reznic
reznic

Reputation: 710

Try like this

Settings - Editor - XML

screenshot

Upvotes: 1

Milon
Milon

Reputation: 2249

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

Win/Linux:

Ctrl + Alt + L

Mac:

Option + Command + L

Upvotes: 13

Related Questions