Skip to content

Instantly share code, notes, and snippets.

@bgorkowy
Created April 8, 2014 22:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgorkowy/10204320 to your computer and use it in GitHub Desktop.
Save bgorkowy/10204320 to your computer and use it in GitHub Desktop.
Shared Preference util class starting body, using Android Annotations
import org.androidannotations.annotations.sharedpreferences.DefaultInt;
import org.androidannotations.annotations.sharedpreferences.DefaultString;
import org.androidannotations.annotations.sharedpreferences.SharedPref;
@SharedPref(value = SharedPref.Scope.APPLICATION_DEFAULT)
public interface PrefsUtil {
/**
* Example int preference, with default value 0
*/
@DefaultInt(0)
int exampleInt();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment