6

Menu -> Code -> Reformat Code

Previous Android Studio version, my hands are very used to click Ctl+Alt+L to format code whenever I have typed some code block. After I updated to Android Studio 3.5, I formatted the code in XML and it is giving me wrong arrangement of my views and destroying my design.

Here is the design before code reformatting.

enter image description here

After code reformatted (click -> Ctl+Alt+L), my views was shuffled in both design and xml code side. please see second picture.

enter image description here

It seems a bug and I already reported it to Google Issue Tracker.

piet.t
  • 11,400
  • 21
  • 42
  • 50
ZarNi Myo Sett Win
  • 1,253
  • 3
  • 17
  • 36

1 Answers1

16

I just got answer from one of my colleague. That works well.

Settings -> Editor -> Code Style -> XML-> Set From -> Predefined Style > Android.

enter image description here

ZarNi Myo Sett Win
  • 1,253
  • 3
  • 17
  • 36