code: private void setContentShown(boolean shown, boolean animate) {
          ensureContent();
          if (mContentShown == shown) {
              return;
          }
          mContentShown = shown;
          if (shown) {
              if (animate) {
                  mProgressContainer.startAnimation(AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_out));
                  mContentContainer.startAnimation(AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in));
              } else {
                  mProgressContainer.clearAnimation();
                  mContentContainer.clearAnimation();
              }
              mProgressContainer.setVisibility(View.GONE);
              mContentContainer.setVisibility(View.VISIBLE);
          } else {
              if (animate) {
                  mProgressContainer.startAnimation(AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_in));
                  mContentContainer.startAnimation(AnimationUtils.loadAnimation(getActivity(), android.R.anim.fade_out));
              } else {
                  mProgressContainer.clearAnimation();
                  mContentContainer.clearAnimation();
              }
              mProgressContainer.setVisibility(View.VISIBLE);
              mContentContainer.setVisibility(View.GONE);
          }
      }
docs: Control whether the content is being displayed.  You can make it not
  displayed if you are waiting for the initial data to show in it.  During
  this time an indeterminant progress indicator will be shown instead.
  
  @param shown   If true, the content view is shown; if false, the progress
  indicator.  The initial value is true.
  @param animate If true, an animation will be used to transition to the
  new state.