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

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

 

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

  • tools:menu

  • tools:actionBarNavMode

  • tools:listitem/listheader/listfooter

  • tools:showIn

  • tools:layout

 

相关文章:

  • 2021-05-21
  • 2022-12-23
  • 2021-06-18
  • 2021-10-03
  • 2022-12-23
  • 2021-12-17
  • 2021-06-24
  • 2021-10-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-09-14
  • 2021-08-26
  • 2021-08-11
  • 2021-09-22
相关资源
相似解决方案