Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Get user default values from user preference
Browse files Browse the repository at this point in the history
  • Loading branch information
HarinderSinghRana committed Nov 27, 2023
1 parent dd39c2d commit ed421e8
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ public static void initPreferences(final Context context, final Resources resour
PreferencesOpenHelper.newInstance(PREFERENCES_VERSION).check();
}

public static SharedPreferences getDefaultSharedPreferences(){
return PreferencesUtils.sharedPreferences;
}

public static Resources getDefaultResources(){
return PreferencesUtils.resources;
}

public static int getDefaultPreferenceVersion(){
return PreferencesUtils.PREFERENCES_VERSION;
}

public static void registerOnSharedPreferenceChangeListener(SharedPreferences.OnSharedPreferenceChangeListener changeListener) {
sharedPreferences.registerOnSharedPreferenceChangeListener(changeListener);
changeListener.onSharedPreferenceChanged(sharedPreferences, null);
Expand Down

0 comments on commit ed421e8

Please sign in to comment.