为什么在Android中更改了资源命名约定?

时间:2017-04-19 18:07:23

标签: android android-studio naming-conventions multilingual

过去在Android中构建多语言应用程序时,我曾经将strings.xml放在后面的树中:

res
├── values
│   └── strings.xml
└── values-es
    └── strings.xml

目前(根据​​tutorial)它应该是这样的:

res
├── values
│   └── strings.xml
└── values-b+es
    └── strings.xml

请注意 values-b + es ,而不是 values-es 。我找不到为什么它被改变了,对我来说它看起来比以前更糟,所以我想知道这种改变的原因是什么?

更新的更新Android Studio仍以旧方式自动生成这些名称:

enter image description here

1 个答案:

答案 0 :(得分:1)

  

我找不到改变的原因

旧方法仍然有效,并且是大多数开发人员使用的方法,因为那是decent documentation的方法。此外,新方法仅适用于某些API级别(由于文档较差,我忘记添加时)。

  

我想知道这种变化的原因是什么?

AFAIK,新方法采用了不同的命名方案,扩展了对更多语言/区域组合的支持。