Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SharedPreferences name configurable #145

Open
chrgernoe opened this issue Feb 6, 2024 · 0 comments
Open

Make SharedPreferences name configurable #145

chrgernoe opened this issue Feb 6, 2024 · 0 comments

Comments

@chrgernoe
Copy link

Is your feature request related to a problem?

In my app I would like to set the SharedPreferences name (XML file) to a specific value for backward compatibility.

In the current implementation of this package the context name is used and cannot be changed. In the Android preference implementation the names can be changed. Since this package is used by your project ColorPickerPreference, which extends the Android classes, it leads to the issue that preferences are stored in different XML files.

Describe the solution you'd like:

My suggestion would be to implement the same behavior as in the Android library. Make the preference manager public and implement a method to set the shared preference name.

Describe alternatives you've considered:

Currently I'm using the Kotlin extension language feature to make the ColorPickerView().preferenceManager and ColorPickerPreferenceManager().sharedPreferences accessible. It works but in my eyes it is no clean solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant