zoukankan      html  css  js  c++  java
  • android怎么在不同环境设置下选择不同的resource呢

    android怎么在不同环境设置下选择不同的resource呢,例如,不同的语言设置,屏幕不同的方向,屏幕不同大小之类。

    一般请况下我们会在那些resource folder 后面加上qualifiers,如果加两个或以上qualifiers,我们要按以下的顺序加

    Table 15.1 Characteristics with configuration qualifiers

    1. Mobilecountrycode(MCC),optionallyfollowedbymobilenetworkcode(MNC)

    2. Language code, optionally followed by region code

    3. Layout direction

    4. Smallest width

    5. Availablewidth

    6. Availableheight

    7. Screensize

    8. Screenaspect

    9. Screenorientation

    10. UI mode

    11. Night mode

    12. Screen density (dpi)

    13. Touchscreen type

    14. Keyboard availability

    15. Primary text input

    16. Navigation key availability

    17. Primary non-text navigation method

    18. API level

    You can find descriptions of these characteristics and examples of specific configuration qualifiers at http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources. 

    同样,android 系统在除掉了不合符的resource 后,就按上图的顺序的qualifier 去找到最合适的resource 来用了

    You can see a complete list of supported (unqualified) res subdirectories at http://developer.android.com/guide/topics/resources/providing-resources.html#ResourceTypes. 

    from bigNerRanchGuide

  • 相关阅读:
    应用层协议及ip地址划分
    请求与响应编码及jsp基本原理
    springboot注解
    springboot 快速入门
    Http协议简单解析及web请求过程
    Tomcat原理详解及请求过程
    mysql数据库乱码的问题解决
    AOP的实现原理
    Springl利用Aspectj的扩展实现Aop
    JDK动态代理实现原理
  • 原文地址:https://www.cnblogs.com/howarddeng/p/5439895.html
Copyright © 2011-2022 走看看