Closed tcqq closed 6 years ago
This is the expected behavior as the preferences are saved to the SharedPreferences
which in turn saves them on the device's internal memory, thus the read happening from the disk. This needs to happen during layout (so on the main thread) otherwise there would be no data to show to the user which would result in flickering artifacts when the data is available on a separate thread. You can basically ignore this "warning" because this is the intended behavior. If you want to overcome this problem, you can try this stackoverflow answer.
Thanks for reply, I understand.
@Gericop When start strict mode and set
android:persistent
totrue
will has error. How can I fix this error? Thanks.Application
preference_example.xml
PreferenceFragment:
Error log: