SharedPreferences return only default value

后端 未结 3 1398
一整个雨季
一整个雨季 2021-01-19 13:15

So instead of creating a database, I\'m storing the data using SharedPreference.

My code is below:

   SharedPreferences.Editor editor =          


        
3条回答
  •  梦谈多话
    2021-01-19 14:01

    Do you use shared preferences in two different activieties of one app ?

    Also try to specify preferences name, or use some Manager to handle all preferences, all this explained here

提交回复
热议问题