private boolean shouldHeaderBeShown() {
        SharedPreferences sharedPreferences =
                PreferenceManager.getDefaultSharedPreferences(getActivity());
        String key = getString(R.string.show_dialog_header_preference_key);
        boolean defaultValue =
                getResources().getBoolean(R.bool.show_dialog_header_preference_default_value);
        return sharedPreferences.getBoolean(key, defaultValue);
    }
private boolean shouldHeaderBeShown ( ) { SharedPreferences sharedPreferences = PreferenceManager . getDefaultSharedPreferences ( getActivity ( ) ) ; String key = getString ( R . string . show_dialog_header_preference_key ) ; boolean defaultValue = getResources ( ) . getBoolean ( R . bool . show_dialog_header_preference_default_value ) ; return sharedPreferences . getBoolean ( key , defaultValue ) ; }
Returns, whether the header of the example dialog should be shown, or not.

@return True, if the header should be shown, false otherwise