package org.mo.common.util.sharepreferences;import android.content.context;import android.content.sharedpreferences;public class mysharepreferences {private context Mcontext;private static mysharepreferences mysharepreferences;public mysharepreferences getinstance (Context mcontext) {if (mysharepreferences == null) { Mysharepreferences = new mysharepreferences (Mcontext);} Return mysharepreferences;} Private mysharepreferences (Context mcontext) {super (); this.mcontext = mcontext;} Public sharedpreferences getprivatesharedpreferences (String name) {SharedPreferences Sharedpreferences = getsharedpreferences (name,context.mode_private); return sharedpreferences;} Public sharedpreferences getsharedpreferences (String name, int model) { Sharedpreferences sharedpreferences = mcontext. getsharedpreferences (Name, model); return sharedpreferences;}}
(android-002) About shareprefences use