public static void putBooleanDirect(final String key, final boolean value) {

        if (sharedPrefs == null) {
            return;
        }
        final SharedPreferences.Editor edit = sharedPrefs.edit();
        edit.putBoolean(key, value);
        edit.apply();
    }
Follow the global system setting for dark mode.
main/src/main/java/cgeo/geocaching/settings/Settings.java