-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SharedPreferences写入有时候没有生效 #12
Comments
我在下个版本改一下 |
CodeXiaoMai
added a commit
that referenced
this issue
Dec 12, 2018
问题已经修复,请使用最新版本 |
commit()有返回值,判断下返回值比较好 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
发现有的手机环境切换没有生效,后来发现SharedPreferences的写入操作用的是apply(),这个方法是异步的,所有存在写入没有完成,就回调onEnvironmentChange方法,建议改成commit()方法,执行成功再回调
The text was updated successfully, but these errors were encountered: