code: public void setOnProgressView(View v) {
          int progressViewVisibility = -1;
          if (this.onProgressView != null) {
              progressViewVisibility = this.onProgressView.getVisibility();
              removeView(this.onProgressView);
          }
  
          this.onProgressView = v;
          if (this.onProgressView != null) {
              addView(this.onProgressView);
              if (progressViewVisibility != -1)
                  this.onProgressView.setVisibility(progressViewVisibility);
          }
      }
docs: Overwrite the default ProgressView to represent loading progress state
  It is controlled by stopLoading and startLoading methods, that only sets it to VISIBLE and GONE
  <p>
  Remember to set RelativeLayout.LayoutParams before setting the view.
  
  @param v The custom View that will be used as progress view.
  Set it to null to remove the default one