Android Studio or IDEA:
Editor > Code Style > XML
Other Wrap attributes:Wrap always Android Layout Files Include namespace declarations = true Insert line break after last attribute = true