Skip to content

cesarferreira/PainlessPrefs

Repository files navigation

PainlessPrefs

Static way to set/get shared preferences

As simple as it gets:

// save key/value pair
PainlessPrefs.getInstance(context)
	.save("SOME_KEY", true);

// getting it back
boolean someBoolean =
	PainlessPrefs.getInstance(context)
	.getBoolean("SOME_KEY", DEFAULT_VALUE);

Installation

Add it in your root build.gradle at the end of repositories:

allprojects {
		repositories {
			...
			maven { url "https://jitpack.io" }
		}
	}

Now add your dependency:

dependencies {
	compile 'com.github.cesarferreira:PainlessPrefs:0.1.0'
}

About

Static way to use android preferences, no hassle

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages