import android.content.Context;
import android.content.SharedPreferences;
public class SharedPreferenceUtil {
private static final String FILE_NAME = "appname";
/**
*储存
* @param context
* @param isShowGuide
*/
public static void putShowGuide(Context context,String valueName,Boolean isShowGuide){
SharedPreferences.Editor editor = context.getSharedPreferences(FILE_NAME,Context.MODE_PRIVATE).edit();
editor.putBoolean(valueName,isShowGuide);
editor.commit();
}
/**
*获取
* @param context
* @return
*/
public static boolean getShowGuide(Context context,String valueName){
return context.getSharedPreferences(FILE_NAME,Context.MODE_PRIVATE).getBoolean(valueName,true);
}
}