Code example for Preferences

Methods: put

0
 
    private final static String CreatorKey = "Creator";
 
    public static void setDefaultCopyright(String text) {
        if (text != null) {
            Prefs.put(CopyrightKey, text);
        } 
        else { 
            Prefs.remove(CopyrightKey);
        } 
    } 
 
    public static String getDefaultCopyright() {
        return Prefs.get(CopyrightKey, null);
    } 
 
    public static void setDefaultCreator(String text) {
        if (text != null) {
            Prefs.put(CreatorKey, text);
        } 
        else {