Skip to content

Make SharedPreferences name configurable #145

@chrgernoe

Description

@chrgernoe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions