常见的命名空间
工具属性参考文档
Android Studio 支持 tools 命名空间中的多种 XML 属性,这些属性支持设计时功能(例如要在 Fragment 中显示哪种布局)或编译时行为(例如要对 XML 资源应用哪种缩减模式)。在您构建应用时,构建工具会移除这些属性,以免它们会对 APK 大小或运行时行为产生影响。
若要使用这些属性,请将 tools 命名空间添加到各个目标 XML 文件的根元素中,如下所示:
<RootTag xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" >