17

几需一行代码完成多语言切换

 4 years ago
source link: https://juejin.im/post/5d1970dd6fb9a07ee63f7c79
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
背景 之前总是有开发者反馈我应用切换了语言,可是工具类获取的 string 却没有发生改变。其实这个问题很简单,你切换语言的 Context 只作用在了你的 Activity 上,并没有对你的 Application 做同样的操作,知道了这点,那么解决问题就很

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK