Skip to content

cesarferreira/PainlessPrefs

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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