16

Recently I have updated to Android Studio 3.5. I have three views: an EditText, a TextView and a Button inside a vertical LinearLayout(ViewGroup) named sample.xml file. When I format the stuff by pressing ctrl+alt+L, all the views get rearranged automatically. In my case the Button view which is in the bottom has reached to top after formatting, also EditText and TextView which is in top first and second are rearranged in second and third position respectively in vertical LinearLayout.

Android Studio : 3.5

Android Gradle Plugin: 3.5.0

Gradle: 5.4.1

JRE: 1.8.0_202-release-1483-b03x64

OS: Windows 8.1(amd64) v6.3

elyar abad
  • 730
  • 1
  • 7
  • 24
Shashi Shiva L
  • 433
  • 7
  • 20

1 Answers1

43

Please try below settings that worked for me

Settings -> Editor -> Code Style -> XML-> Set From -> Predefined Style > Android.
Jignesh Mayani
  • 4,974
  • 1
  • 15
  • 30