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.
After code reformatted (click -> Ctl+Alt+L), my views was shuffled in both design and xml code side. please see second picture.
It seems a bug and I already reported it to Google Issue Tracker.
I just got answer from one of my colleague. That works well.
Settings -> Editor -> Code Style -> XML-> Set From -> Predefined Style > Android.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With