Lint 检测移除业务代码中多余的部分
padding 和 margin
如果需要适配RTL布局,使用 start 和 end 代替 left 和 right
阿拉伯等语言是从右到左的布局,需要额外适配工作开启RTL
Lint → Android → Internationalization→Hardcoded text
适配 RTL 布局会有个镜像的问题,可以多适配一套图片,或者ImageView镜像处理图片
Language | Specific Region Only | Directory name |
---|---|---|
zh:Chinese | - | values-zh |
zh:Chinese | CN:China | values-zh-rCN |
zh:Chinese | HK:Hong Kong SAR China(香港) | values-zh-rHK |
zh:Chinese | MO:Macau SAR China | values-zh-rMO |
zh:Chinese | SG:Singapore(新加坡) | values-zh-rSG |
zh:Chinese | TW:Taiwan(台湾) | values-zh-rTW |
en:English | - | values-en |
th:Thai | - | values-th |
th:Thai | TH:Thailand | values-th-rTH |
ar:Arabic(阿拉伯) | - | values-ar |
vi:Vietnamese | - | values-vi |
vi:Vietnamese | VN:Vietnam | values-vi-rVN |
fr:French(法国) | - | values-fr |
it:Italian(意大利) | - | values-it |
http://www.unicode.org/iso15924/iso15924-codes.html
Script | 说明 |
---|---|
Hans | 简体 |
Hant | 繁体 |
res → Android Resource File → Locale
上一篇:20230122英语学习