开发者

Android, costum localisation while running app

开发者 https://www.devze.com 2023-02-23 03:46 出处:网络
i have problem switching locale language while app is 开发者_如何学Cstill running, how to do that? Thanks. I have read lot of docs... and still do not find solution.Sample code in Changing Locale with

i have problem switching locale language while app is 开发者_如何学Cstill running, how to do that? Thanks. I have read lot of docs... and still do not find solution.


Sample code in Changing Locale within the app itself


Be careful, changing the locale on the fly isn't officially supported! You have to take care of refreshing every text yourself! In my case, as I don't have many UI elements, I just did button1.setText(R.string.hello); button2.setText(R.string.bye); after chaning the locale.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号