code: private boolean shouldUseAnimations() {
          SharedPreferences sharedPreferences =
                  PreferenceManager.getDefaultSharedPreferences(getActivity());
          String key = getString(R.string.animation_preference_key);
          boolean defaultValue = getResources().getBoolean(R.bool.animation_preference_default_value);
          return sharedPreferences.getBoolean(key, defaultValue);
      }
docs: Returns, whether animations should be used to show or hide dialogs, or not.
  
  @return True, if animations should be used, false otherwise