GCX-HCI / tray

a SharedPreferences replacement for Android with multiprocess support
Apache License 2.0
2.29k stars 273 forks source link

Support For PreferenceFragment / PreferenceActivity Is Missing #67

Open JustinTipton opened 8 years ago

JustinTipton commented 8 years ago

If the goal of this project is to be a SharedPreferences replacement, it should support PreferenceFragment / PreferenceActivity, but I don't see that ability.

proninyaroslav commented 8 years ago

Is there a workaround?

StefMa commented 8 years ago

I don't think so, that we will create a TrayActivity or TrayFragment in the future.

To catch all automatic saved values from these Classes you can add a OnSharedPreferenceChangeListener. For example:

@Override
public void onResume() {
    super.onResume();
    getPreferenceManager().getSharedPreferences()
       .registerOnSharedPreferenceChangeListener(this);
}
StefMa commented 7 years ago

Hey guys,

there is an community project of this. Haven't yet looked into it, but maybe it helps?!

See #82

draekko commented 7 years ago

@StefMa It replaces most of the views and the activity/fragments and wraps it around Tray instead of SharedPreferences. I use it in one app as UI replacement for all that SharedPreferences crap which doesn't work (well or at all) with multiprocess apps.

draekko commented 7 years ago

@StefMa Updated the code so now it should now work fine for API 21+ and added missing notify listeners.