Here you can find the source of putPrefInt(Context c, String key, int value)
public static void putPrefInt(Context c, String key, int value)
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; public class Main { public static void putPrefInt(Context c, String key, int value) { SharedPreferences sp = PreferenceManager .getDefaultSharedPreferences(c); sp.edit().putInt(key, value).commit(); }// w w w . j a v a 2 s .c o m }