Code example for SharedPreferences

Methods: containsgetBoolean

0
        if (isGlobal(key) || !mPrefLocal.contains(key)) {
            return mPrefGlobal.getLong(key, defValue);
        } else { 
            return mPrefLocal.getLong(key, defValue);
        } 
    } 
 
    @Override 
    public float getFloat(String key, float defValue) {
        if (isGlobal(key) || !mPrefLocal.contains(key)) {
            return mPrefGlobal.getFloat(key, defValue);
        } else { 
            return mPrefLocal.getFloat(key, defValue);
        } 
    } 
 
    @Override 
    public boolean getBoolean(String key, boolean defValue) {
        if (isGlobal(key) || !mPrefLocal.contains(key)) {
            return mPrefGlobal.getBoolean(key, defValue);
        } else {