0

I was using SharedPreferences and everything was working fine.

Then I started tweaking the UI. I added HoloEverywhere as a dependency and extended SActivity instead of Activity. Now none of the SharedPreferences work.

mPrefs = mCtx.getSharedPreferences(ctx.getPackageName(),
Context.MODE_PRIVATE);
mEditor = mPrefs.edit();

This is how I initialized my SP using android's SP at first. I noticed HE also has extended SP so I changed my code to using HE's PreferenceManager and SharedPreferences.

mPrefs = PreferenceManager.getDefaultSharedPreferences(ctx);
mEditor = mPrefs.edit();

However, none of my operations are still being saved into SP. Am I doing anything wrong here?

Some Noob Student
  • 14,186
  • 13
  • 65
  • 103

1 Answers1

0

It turns out the behavior I have observed was indeed unexpected behavior. After reporting it, the author has fixed it. Kudos to him.

Some Noob Student
  • 14,186
  • 13
  • 65
  • 103