After updating Android Studio to 3.5 whenever I auto format code (cmd+opt+l) it changes the order of the view tags inside the xml.
So for example in a LinearLayout
your views would move around
Found the solution:
Preferences -> Editor -> Code Style -> XML
Search for Set from
on the top left.
Set from -> Predefined Style -> Android
Don't forget to apply your changes
Hope this helps someone