Get SharedPreferences Editor - Android Android OS

Android examples for Android OS:SharedPreferences

Description

Get SharedPreferences Editor

Demo Code


//package com.java2s;
import android.content.Context;
import android.content.SharedPreferences;

public class Main {
    private static final String ACCOUNT_PREFS = "Devnexus.AccountPrefs";

    private static SharedPreferences.Editor edit(Context context) {
        return context.getSharedPreferences(ACCOUNT_PREFS,
                Context.MODE_PRIVATE).edit();
    }//w  ww  .  j av a  2  s .c om
}

Related Tutorials