Intellij IDEA formatting XML with aligning attributes

android, intellij-idea, xml

Solution

Unfortunately this is not possible. I've always thought that this is something that would be useful. Your question prompted me to opened a feature request for it: IDEA-117587: XML - Align attribute values Please consider voting for it.

Problem

Is there any chance to format XML files, and some code like this: ``` <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:longClickable="false" > ``` to be like this? ``` <RelativeLayout android:layout_width = "fill_parent" android:layout_height = "wrap_content" android:orientation = "horizontal" android:longClickable = "false" > ``` I've tried the space around "=" option, but that's not what I want.

Original source