Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.Context;

import android.content.SharedPreferences;

import android.preference.PreferenceManager;

public class Main {
    public static void setSettingInt(final Context context, final String key, final int value) {
        SharedPreferences setting = PreferenceManager.getDefaultSharedPreferences(context);
        SharedPreferences.Editor editor = setting.edit();
        editor.putInt(key, value);
        editor.commit();
    }
}