private void switchRecentlyReportFragment() {

    switchActionBar(true);
    FragmentManager fm = getChildFragmentManager();
    FragmentTransaction ft = fm.beginTransaction();
    if (recentFragment == null) {
      // recentFragment = new BORecentTrendFragment();
      BloodOxygenRecentlyController controller = new BloodOxygenRecentlyController();
      recentFragment =
          (BloodOxygenRecentTrendFragment)
              controller.getFragment(
                  AbstractUsePagingTaskCacheController.MEASURE_TYPE_RECENTLY, false);
    }
    if (!recentFragment.isAdded()) {
      if (monthFragment != null) {
        ft.hide(monthFragment);
      }
      ft.add(id.fragment_container, recentFragment);
    } else {
      if (monthFragment != null) {
        ft.hide(monthFragment);
      }
      ft.show(recentFragment);
    }
    ft.commitAllowingStateLoss();
  }
  private void doShare() {

    if (!NetUtil.isConnect(getActivity())) {
      ErrorDialogUtil.showErrorDialog(
          getActivity(), CloudStatusCodeProxy.TYPE_MEASURE, LocalCode.CODE_18100, true);
    } else {

      if (isRecentState) {
        recentFragment.doShare();
      } else {
        monthFragment.doShare();
      }
    }
  }