sharedpreferences

Observing SharedPreferences Data

孤者浪人 提交于 2020-08-24 01:19:25
问题 I am trying to observe data changes in shared preferences. I found this similar question answered by @SimplyProgrammerand followed the steps that he directed and at the end of the day my observer was still not working. Then I decided to seek some assistance to better understand why. this is my implementation I started by implementing the abstract live data SharedPreferences preference; String key; T defValue; public SharedPrefferenceLiveData(SharedPreferences preference,String key,T defValue)

Observing SharedPreferences Data

霸气de小男生 提交于 2020-08-24 01:17:11
问题 I am trying to observe data changes in shared preferences. I found this similar question answered by @SimplyProgrammerand followed the steps that he directed and at the end of the day my observer was still not working. Then I decided to seek some assistance to better understand why. this is my implementation I started by implementing the abstract live data SharedPreferences preference; String key; T defValue; public SharedPrefferenceLiveData(SharedPreferences preference,String key,T defValue)