@Override
  public void onViewCreated(Bundle savedInstanceState) {
    super.onViewCreated(savedInstanceState);

    if (savedInstanceState == null) {
      final Calendar cal = Calendar.getInstance();

      cal.setTimeInMillis(System.currentTimeMillis());
      getView().setEndDate(cal.getTime());

      cal.add(Calendar.DAY_OF_MONTH, -DEFAULT_DAY_RANGE);
      getView().setStartDate(cal.getTime());
    }

    if (adManager.shouldShowAd()) {
      getView().showAd();
    }
  }