it took me a few weeks to get that right.  here's my example for a boolean 
value. And yes, .setDefaultValues is actually working, despite what you may 
think :-/

   @Override
    protected void onSetInitialValue(boolean restoreValue, Object 
defaultValue) {
    boolean temp = restoreValue ? getPersistedBoolean(false) : 
defaultValue.toString().equals("true") ? true : false;
    if (!restoreValue)
        persistBoolean(temp);
    this.oldValue = temp;
    }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to