Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XML code formatting gives wrong arranging child views in LinearLayout Android Studio 3.5 [duplicate]

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.

like image 819
ZarNi Myo Sett Win Avatar asked Aug 27 '19 09:08

ZarNi Myo Sett Win


1 Answers

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

like image 181
ZarNi Myo Sett Win Avatar answered Nov 14 '22 14:11

ZarNi Myo Sett Win