Android(安卓)Studio如何格式化XML代码顺序
16lz
2021-01-26
之前用Eclipse时,格式化XML代码,也会把顺序格式化,这样比较方便,看起来也清晰明了。
比如:
用Eclipse格式化时,会变成:
Android Studio解决办法:
File > Settings > Code Style > XML > Set from > Predefined Style > Android
勾上File > Settings > Editor > Formatting > Show “Reformat Code” 选项
在XML处格式化代码(默认快捷键是CTRL+ALT+L ,Eclipse是:CTRL+ALT+F)
在弹出 的对话框中勾上Rearrange entries 选项
更多相关文章
- DexHunter脱壳神器分析
- 【Android(安卓)UI】具有弹性的ListView
- YUV420转RGB的代码(C++/JAVA)
- Android(安卓)开机自动启动服务
- android之Can't create handler inside thread that has not cal
- android 客户端数据传递之一:Web Service 代码
- 《第一行代码--Android》读书笔记之使用通知和多媒体
- android 状态栏、标题栏、屏幕高度
- Android中proguard的作用