Search in sources :

Example 1 with Editor

use of android.content.SharedPreferences.Editor in project SimplifyReader by chentao0707.

the class AccInitData method setMemoryRestrict.

public static void setMemoryRestrict(Context context, int space) {
    Editor editor = context.getSharedPreferences(PREFS_NAME, PREFS_MODE).edit();
    editor.putInt(MEMORY_RESTRICT, space);
    editor.commit();
}
Also used : Editor(android.content.SharedPreferences.Editor)

Example 2 with Editor

use of android.content.SharedPreferences.Editor in project SimplifyReader by chentao0707.

the class AccInitData method setAndroidVersionRestrict.

public static void setAndroidVersionRestrict(Context context, int version) {
    Editor editor = context.getSharedPreferences(PREFS_NAME, PREFS_MODE).edit();
    editor.putInt(ANDROID_VERSION_RESTRICT, version);
    editor.commit();
}
Also used : Editor(android.content.SharedPreferences.Editor)

Example 3 with Editor

use of android.content.SharedPreferences.Editor in project SimplifyReader by chentao0707.

the class AccInitData method setSdcardRestrict.

public static void setSdcardRestrict(Context context, Boolean sdcard) {
    Editor editor = context.getSharedPreferences(PREFS_NAME, PREFS_MODE).edit();
    editor.putBoolean(SDCARD_RESTRICT, sdcard);
    editor.commit();
}
Also used : Editor(android.content.SharedPreferences.Editor)

Example 4 with Editor

use of android.content.SharedPreferences.Editor in project SimplifyReader by chentao0707.

the class AccInitData method setP2pSwitch.

public static void setP2pSwitch(Context context, int p2pSwitch) {
    Editor editor = context.getSharedPreferences(PREFS_NAME, PREFS_MODE).edit();
    editor.putInt(P2P_SWITCH, p2pSwitch);
    editor.commit();
}
Also used : Editor(android.content.SharedPreferences.Editor)

Example 5 with Editor

use of android.content.SharedPreferences.Editor in project cw-advandroid by commonsguy.

the class C2DMessaging method setRegistrationId.

// package
static void setRegistrationId(Context context, String registrationId) {
    final SharedPreferences prefs = context.getSharedPreferences(PREFERENCE, Context.MODE_PRIVATE);
    Editor editor = prefs.edit();
    editor.putString("dm_registration", registrationId);
    editor.commit();
}
Also used : SharedPreferences(android.content.SharedPreferences) Editor(android.content.SharedPreferences.Editor)

Aggregations

Editor (android.content.SharedPreferences.Editor)208 SharedPreferences (android.content.SharedPreferences)103 Context (android.content.Context)6 Intent (android.content.Intent)5 File (java.io.File)5 SuppressLint (android.annotation.SuppressLint)4 DialogInterface (android.content.DialogInterface)3 PackageManager (android.content.pm.PackageManager)3 NameNotFoundException (android.content.pm.PackageManager.NameNotFoundException)3 Resources (android.content.res.Resources)3 Preference (android.preference.Preference)3 View (android.view.View)3 TextView (android.widget.TextView)3 RotateTextToast (com.android.camera.ui.RotateTextToast)3 ArrayList (java.util.ArrayList)3 Activity (android.app.Activity)2 AlertDialog (android.app.AlertDialog)2 Builder (android.app.AlertDialog.Builder)2 MediaRecorder (android.media.MediaRecorder)2 EditTextPreference (android.preference.EditTextPreference)2