Example #1
0
 public static Editor getEditorInstance(Context ctx)
 {
     if (SimplePreferences.EDITORINSTANCE == null)
     {
         SimplePreferences.EDITORINSTANCE = SimplePreferences.getInstance(ctx).Edit();
     }
     return(SimplePreferences.EDITORINSTANCE);
 }
Example #2
0
        public static int incrementAccessCount(Context pCtx, String pKey, int pIncrement)
        {
            SharedPreferences prefs = SimplePreferences.getInstance(pCtx);
            int accessCount         = prefs.GetInt(pKey, 0);

            int newAccessCount = accessCount + pIncrement;

            prefs.Edit().PutInt(pKey, newAccessCount).Commit();

            return(newAccessCount);
        }
Example #3
0
 public static int getAccessCount(Context pCtx, String pKey)
 {
     return(SimplePreferences.getInstance(pCtx).GetInt(pKey, 0));
 }