android tools使用方式

我们希望在布局中显示测试的属性,而这个属性不会影响到正式代码,因此我们就需要tools这个命名空间。

首先定义:xmlns:tools="http://schemas.android.com/tools"

  • tools:context 填入activity的完整包名

  • tools:menu

  • tools:actionBarNavMode

  • tools:listitem/listheader/listfooter

  • tools:showIn

  • tools:layout

原文地址:https://www.cnblogs.com/tianzhijiexian/p/4807781.html