title: Android SeekBar - Change ScrollBar value independently of progress bar
body: <p>I am trying to use a <code>SeekBar</code> to indicate two pieces of information:</p>
  
  <ol>
  <li>The threshold for audio recording, which the user can set.</li>
  <li>The incoming audio level, which the user cannot set.</li>
  </ol>
  
  <p>I would like to use the user touch input to change the <code>ScrollBar</code> of the <code>SeekBar</code>, indicating the desired threshold.  The progress color bar will be programmatically set by me to show audio level, independently of the <code>ScrollBar</code> position, and will not be effected by user input.</p>
  
  <p>I've tried using <code>SeekBar.setScrollX(int)</code> and <code>SeekBar.setScrollY(int)</code>, but the documentation says that these calls will invalidate the view, and indeed the program does crash when one of these functions is called.</p>
  
  <p>Here is the touchEvent code:</p>
  
  <pre><code>@Override
  public boolean onTouchEvent(MotionEvent event) {
      if (!isEnabled()) {
          return false;
      }
  
      switch (event.getAction()) {
          case MotionEvent.ACTION_DOWN:
          case MotionEvent.ACTION_MOVE:
          case MotionEvent.ACTION_UP:
              setProgress(getMax() - (int) (getMax() * event.getY() / getHeight()));
              setScrollX(50); // this causes a MethodNotFoundError
              onSizeChanged(getWidth(), getHeight(), 0, 0);                
              break;
  
          case MotionEvent.ACTION_CANCEL:
              break;
      }
      return true;
  }
  </code></pre>
  
  <p>and here is the simple test onScrollChanged function that I am using.  Note that the NoSuchMethodFoundError still occurs if this is not overridden.</p>
  
  <pre><code>@Override
  public void onScrollChanged(int x, int y, int x1, int y1) {
      super.onScrollChanged(0, 0, 0, 0);
  }
  </code></pre>