简体   繁体   English

CaptureActivity更改应用程序的区域设置(zxing条码扫描器)

[英]CaptureActivity Changes Locale of the application(zxing barcode scanner)

I'm developing a multi-lang app which lets the user choose the preferred language from the setting menu.It works fine everywhere.But something which is the problem is that I integrated zxing in my applications as an standalone barcode scanner,So I'll be able to change the string resource values for different languages,but when I start the CaptureActivity,the locale changes to English in my application,So I have to relaunch the app to have the previous saved language.I couldn't find out the problem,please help me solve this issue. 我正在开发一个多语言应用程序,允许用户从设置菜单中选择首选语言。它在任何地方都可以正常工作。但是问题是我将zxing作为独立的条形码扫描仪集成到了应用程序中,所以我能够更改不同语言的字符串资源值,但是当我启动CaptureActivity时, 语言环境在我的应用程序中更改为英语,因此我必须重新启动该应用程序以使用以前保存的语言。我无法找到问题,请帮助我解决这个问题。 The link for integration process is the following: 集成过程的链接如下:

Integrating ZXing in your Android App as standalone scanner 将ZXing作为独立的扫描仪集成到您的Android应用中

Any hints will be appreciated Thanks in advance 任何提示将不胜感激提前感谢

您必须使用SharedPreferences或任何其他方法来更改当前语言环境...并检查语言环境,并在每个活动及其onResume方法开始时应用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM