code: private boolean shouldTitleBeShown() {
          SharedPreferences sharedPreferences =
                  PreferenceManager.getDefaultSharedPreferences(getActivity());
          String key = getString(R.string.show_dialog_title_preference_key);
          boolean defaultValue =
                  getResources().getBoolean(R.bool.show_dialog_title_preference_default_value);
          return sharedPreferences.getBoolean(key, defaultValue);
      }
docs: Returns, whether the title of the example dialog should be shown, or not.
  
  @return True, if the title should be shown, false otherwise