This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import androidx.preference.PreferenceManager | |
// concrete Singleton | |
object MyPrefManager: SharedPreferencePrimitives() { | |
// here specify preferences' names | |
private const val attachment = "attachment" | |
//call it once |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.content.res.Resources | |
import androidx.preference.PreferenceManager | |
import org.albspazio.myproject.R | |
import org.albaspazio.core.sharedpreferences.SharedPreferenceWrapper | |
// this must be implemented for a specific project | |
object ProjectPreferences: SharedPreferenceWrapper() { | |
// init values of each Preference are stored in a specific resource. associate them! |