开发者

Android, costum localisation while running app

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜