特定产品的Andr​​oid资源

编程入门 行业动态 更新时间:2024-10-26 04:28:54
本文介绍了特定产品的Andr​​oid资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我是从这个设置code程序...

<字符串名称=about_settings产品=平板电脑>关于平板电脑< /串> <字符串名称=about_settings产品=默认>关于手机和LT; /串>

那么我的问题是:

  • 从哪里在运行时,系统加载正确的字符串资源?
  • 我必须做什么添加一个新的产品?例如,

    <字符串名称=about_settings产品=笔记本电脑>关于笔记本电脑< /串>

  • 解决方案      
  • 从哪里在运行时,系统加载正确的字符串资源?
  •   

    该系统在运行时不加载此。正确的字符串资源是按照特定目标构建定义PRODUCT_C​​HARACTERISTICS ploaded $ P $。所以你不能用这个,而从日食建设。这仅用于ploaded上平台建筑应用$ P $

      

    2。我必须做什么添加一个新的产品?例如,

    您需要添加到PRODUCT_C​​HARACTERISTICS在device.mk文件

    i got this code from Settings app...

    <string name="about_settings" product="tablet">About tablet</string> <string name="about_settings" product="default">About phone</string>

    then my questions are:

  • from where at runtime the system load the correct string resource ?
  • What must I do to add a new product? e.g.

    <string name="about_settings" product="laptop">About laptop</string>

  • 解决方案

  • from where at runtime the system load the correct string resource ?
  • The system does not load this at runtime. The correct string resource is preloaded according to PRODUCT_CHARACTERISTICS defined for a specific target build. So you cannot use this while building from eclipse. This is used only for building apps preloaded on platform.

    2 . What must I do to add a new product? e.g.

    You need to add to PRODUCT_CHARACTERISTICS in device.mk file

    更多推荐

    特定产品的Andr​​oid资源

    本文发布于:2023-10-12 20:54:26,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1485869.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:资源   产品   Andr   oid

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!