Example usage for android.preference PreferenceManager getDefaultSharedPreferences

List of usage examples for android.preference PreferenceManager getDefaultSharedPreferences

Introduction

In this page you can find the example usage for android.preference PreferenceManager getDefaultSharedPreferences.

Prototype

public static SharedPreferences getDefaultSharedPreferences(Context context) 

Source Link

Document

Gets a SharedPreferences instance that points to the default file that is used by the preference framework in the given context.

Usage

From source file:Main.java

public static boolean isHorizontal(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("fa_horizontal", false);
}

From source file:Main.java

public static boolean isManualSize(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("manualSize", false);
}

From source file:Main.java

public static String getAssignedTeam(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getString("assignedTeam", "red_1");
}

From source file:Main.java

public static void setFaIconSize(Context context, int size) {
    PreferenceManager.getDefaultSharedPreferences(context).edit().putInt("fa_icon_size", size).apply();
}

From source file:Main.java

public static int getDefaultYunShu(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getInt("yunshu", 0);
}

From source file:Main.java

public static int getBackgroundAlpha(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getInt("fa_background_alpha", 100);
}

From source file:Main.java

public static boolean isEnabled(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("sever_enabled", false);
}

From source file:Main.java

public static boolean isAlwaysShowing(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("fa_always_showing", false);
}

From source file:Main.java

public static boolean hasSeenWhatsNew(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getBoolean("guide_showed", false);
}

From source file:Main.java

public static int getIconTransparency(Context context) {
    return PreferenceManager.getDefaultSharedPreferences(context).getInt("icon_alpha", 100);
}