Android Studio 3.5-格式化(ctrl + Alt + L)XML文件中的代码会重新排列LinearLayout中的视图

Shi*_*iva 8 android android-xml android-studio-3.5

最近,我已更新到Android Studio 3.5。我有三个视图:名为sample.xml文件的垂直LinearLayout(ViewGroup)中的EditText,TextView和Button。当我按ctrl + alt + L格式化内容时,所有视图都会自动重新排列。在我的情况下,位于底部的Button视图在格式化后已到达顶部,位于第一和第二顶部的EditText和TextView也分别在垂直LinearLayout中分别排在第二和第三位置。

Android Studio:3.5

Android Gradle插件:3.5.0

摇篮:5.4.1

JRE:1.8.0_202-release-1483-b03x64

作业系统:Windows 8.1(amd64)v6.3

Jig*_*ani 31

请尝试以下对我有用的设置

Settings -> Editor -> Code Style -> XML-> Set From -> Predefined Style > Android.
Run Code Online (Sandbox Code Playgroud)