I am using AS since 4 years. After last update I observed unexpected auto-formatting of XML layout (while typing and with Code
-> Reformat Code
too).
Here is an example:
Question
I am using Android Studio 3.2.1 Build #AI-181.5540.7.32.5056338, built on October 8, 2018
Android provides a straightforward XML vocabulary that corresponds to the View classes and subclasses, such as those for widgets and layouts. You can also use Android Studio's Layout Editor to build your XML layout using a drag-and-drop interface. Instantiate layout elements at runtime.
You will find out this file inside the res folder and inside it there is another folder named layout where you will get all the layout files for their respective activities or fragments.
XML stands for eXtensible Markup Language, which is a way of describing data using a text-based document. Because XML is extensible and very flexible, it's used for many different things, including defining the UI layout of Android apps.
if you facing same issue with
Android Studio 3.5
please check below article
Android Studio 3.5 Upgrade XML Reformatting Problems
Open File > Settings > Editor > Code Style > XML
Now in layout file make sure you have selected wrap attributes as Wrap always
Like below screenshot:
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