Mir*_*qov 5 xml android android-layout android-xml android-studio
每次我重新格式化我的 XML 代码时,都会xmlns向上移动到写入根元素标记名称的行。
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
Run Code Online (Sandbox Code Playgroud)
xmlns:android...旁边是CoordinatorLayout。我在 AndroidStudio 中使用了代码样式菜单的 XML 部分,但无法做到。当我重新格式化我的布局 XML 文件时,这就是我想要的:
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
Run Code Online (Sandbox Code Playgroud)
有人可以帮我弄这个吗?
File-> Settings-> Editor-> Code style-> XML。Tabs and Intents、Other、Arrangement、Android),选择Android。Layout Files检查下方的Insert line break before first attribure, Include namespace declarations。| 归档时间: |
|
| 查看次数: |
216 次 |
| 最近记录: |