Пример #1
0
 public static Editor getEditorInstance(Context ctx)
 {
     if (SimplePreferences.EDITORINSTANCE == null)
     {
         SimplePreferences.EDITORINSTANCE = SimplePreferences.getInstance(ctx).Edit();
     }
     return(SimplePreferences.EDITORINSTANCE);
 }
Пример #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);
        }
Пример #3
0
 public static int getAccessCount(Context pCtx, String pKey)
 {
     return(SimplePreferences.getInstance(pCtx).GetInt(pKey, 0));
 }
Пример #4
0
        // ===========================================================
        // Getter & Setter
        // ===========================================================

        // ===========================================================
        // Methods for/from SuperClass/Interfaces
        // ===========================================================

        // ===========================================================
        // Methods
        // ===========================================================

        public static int incrementAccessCount(Context pCtx, String pKey)
        {
            return(SimplePreferences.incrementAccessCount(pCtx, pKey, 1));
        }