Android的:基于语言更改开机画面 [英] Android: Change splash screen based on language
问题描述
我有不同的闪屏的应用程序。其中意大利语言和一个用于英语之一。如何设置我的应用程序基于系统的语言来选择正确的形象?
I have an app with different splash screen.. One for italian language and one for the english one. How can I set my app to choose the correct image based on system language?
推荐答案
您可以把不同的可绘制和布局在不同的资源目录,例如:
You can put different drawables and layouts in different resource directories such as:
res/drawable-en/
res/drawable-it/
res/layout-en/
res/layout-it/
连接
英语和是
意大利。这可能是最好保持在标准目录默认资源,没有语言说明。
en
for english and it
for italian. It might be best to keep the "default" resources in the standard directories with no language specifier.
如果你的名字这些目录的同名内的实际文件,则系统会自动拾取取决于用户区域设置正确的文件。
If you name the actual files inside those directories as the same name, then the system will automatically pick the correct file depending on the users locale.
请参阅的Android文档以获取更多信息。
See Android Docs for more information.
这篇关于Android的:基于语言更改开机画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!