Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 880 Bytes

README.md

File metadata and controls

40 lines (30 loc) · 880 Bytes

Prefs

Android Arsenal

Simple Android SharedPreferences wrapper.

Repository

Add this in your root build.gradle file (not your module build.gradle file):

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

Dependency

Add this to your module's build.gradle file (make sure the version matches the JitPack badge above):

dependencies {
	...
	compile 'com.github.GrenderG:Prefs:1.1'
}

Usage

  Prefs.with(yourContext).readInt(YOUR_KEY_VALUE);
  Prefs.with(yourContext).readInt(YOUR_KEY_VALUE, defaultValue);
  
  Prefs.with(yourContext).writeInt(YOUR_KEY_VALUE, valueToStore);