public PullToRefreshModule setLoadingImageDelegate(
      PullToRefreshHelper.LoadingImageDelegate loadingImageDelegate) {
    this.loadingImageDelegate = loadingImageDelegate;

    if (refreshLoadingView != null)
      refreshLoadingView.setLoadingImageDelegate(loadingImageDelegate);

    return this;
  }
  protected void onPrepareForPullToRefresh(MotionEvent event) {
    if (container == null) container = (ViewGroup) parent.getChildAt(0);

    refreshViewParent = (ViewGroup) container.findViewById(R.id.cu__ptr_parent);

    if (refreshViewParent != null) {
      refreshImageView = (PTRImageView) refreshViewParent.findViewById(R.id.cu__ptr_image);
      refreshImageView.setPulledImageDelagate(pulledImageDelegate);

      refreshLoadingViewParent = (ViewGroup) parent.findViewById(R.id.cu__ptr_loading_view_parent);
      refreshLoadingView = (PTRLoadingView) parent.findViewById(R.id.cu__ptr_loading_view);
      refreshLoadingView.setLoadingImageDelegate(loadingImageDelegate);
    }

    pullTouchStartY = event.getRawY();
  }