Search code examples
androidxmlandroid-studioformatandroid-linearlayout

Unexpected XML View formatting Android Studio 3.5


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


Solution

  • 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