List of usage examples for android.content Context MODE_PRIVATE
int MODE_PRIVATE
To view the source code for android.content Context MODE_PRIVATE.
Click Source Link
From source file:Main.java
public static float getFloat(Context context, String key) { SharedPreferences sp = context.getSharedPreferences(key, Context.MODE_PRIVATE); float value;/*from w w w. ja v a 2s . c om*/ value = sp.getFloat(key, -1F); return value; }
From source file:Main.java
public static boolean getBoolean(Context context, String key) { SharedPreferences sp = context.getSharedPreferences("liu", Context.MODE_PRIVATE); return sp.getBoolean(key, false); }
From source file:Main.java
public static String getUsrname(Context context) { return context.getSharedPreferences(XL_PREFERENCES, Context.MODE_PRIVATE).getString("usrnmae", null); }
From source file:Main.java
public static int getInt(String key, int defValue, Context ctx) { SharedPreferences sp = ctx.getSharedPreferences("config", Context.MODE_PRIVATE); return sp.getInt(key, defValue); }
From source file:Main.java
public static boolean getBoolean(Context context, String key) { SharedPreferences sp = context.getSharedPreferences("tron", Context.MODE_PRIVATE); return sp.getBoolean(key, false); }
From source file:Main.java
public static String getString(Context context, String key) { SharedPreferences sp = context.getSharedPreferences(key, Context.MODE_PRIVATE); String value;//from w ww. j a v a 2 s . c o m value = sp.getString(key, ""); return value; }
From source file:Main.java
public static String getSessionid(Context context) { return context.getSharedPreferences(XL_PREFERENCES, Context.MODE_PRIVATE).getString("sessionid", null); }
From source file:Main.java
public static String getString(Context context, String key) { SharedPreferences sp = context.getSharedPreferences("myshop", Context.MODE_PRIVATE); return sp.getString(key, ""); }
From source file:Main.java
public static int getMode(String txt, Context context, String key) { SharedPreferences sp = context.getSharedPreferences(txt, Context.MODE_PRIVATE); return sp.getInt(key, -1); }
From source file:Main.java
public static boolean getBoolean(Context context, String key) { SharedPreferences sp = context.getSharedPreferences("xiaolu", Context.MODE_PRIVATE); return sp.getBoolean(key, false); }