Android product="tablet" or "phone" 设置

来源:互联网 发布:传媒大数据 编辑:程序博客网 时间:2024/05/02 04:17

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

 

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

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


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