I\'m facing problem with keeping proper order of XML attributes in Android Studio. As you can see below, the style attribute is between layout_* at
style
layout_*
To delete empty lines between them:
Preferences > Code Style > XML > Other > Keep blank lines: 0
And then just reformat your XML files.