`
maoxy
  • 浏览: 143056 次
  • 性别: Icon_minigender_2
  • 来自: 广州
社区版块
存档分类
最新评论

String.xml中product属性使用

阅读更多

Android的资源文件string.xml会出现下面同名的字符串,如下所示

 

<string name="build_type" product="tv">"智能电视"</string>
<string name="build_type" product="phone">"智能手机"</string>

不同的product就会取不同的值。


product的值在对应的device目录下的mk文件当中有定义:PRODUCT_CHARACTERISTICS := tv

这样就能根据不同的产品显示不同的值了。

 

1
8
分享到:
评论
Global site tag (gtag.js) - Google Analytics