title: How to make the android.widget.Scroller stop scrolling at a specific item index?
body: <p>I'm experimenting with this project:
  <a href="https://github.com/maarek/android-wheel/blob/master/wheel-demo/src/kankan/wheel/demo/extended/PasswActivity.java" rel="nofollow noreferrer">https://github.com/maarek/android-wheel/blob/master/wheel-demo/src/kankan/wheel/demo/extended/PasswActivity.java</a></p>
  
  <p><strong>I've been trying to implement the following:</strong></p>
  
  <p>1) set the wheel to land on the number 5 (or any other number)</p>
  
  <p>2) scroll the wheel for about 2 seconds</p>
  
  <p>3) after spinning stops (could be any number of rotations through 0 to 9) the value shown is what's set in step 1</p>
  
  <p><strong>my work so far:</strong></p>
  
  <p>within WheelView -> WheelScroller I've added the following method (and also added a reference to the parent View):</p>
  
  <pre><code>public void flingToY(int initialVelocity, final int finalYindex) {
      scroller.forceFinished(true);
  
      lastScrollY = 0;
      final int maxY = 0x7FFFFFFF;
      final int minY = -maxY;
      scroller.fling(0, lastScrollY, 0, initialVelocity, 0, 0, minY, maxY);
  
      setNextMessage(MESSAGE_SCROLL);// specific to the view to allow it to scroll
  
      parentView.postDelayed(new Runnable() {
          @Override
          public void run() {
              //scroller.extendDuration(1000);
              scroller.setFinalY(finalYindex);
          }
      }, 1000);
  }
  </code></pre>
  
  <p><strong>the end result:</strong></p>
  
  <p>after the call to <code>setFinalY()</code> the wheel just stops turning and the digit that's shown is always "0"</p>
  
  <p>You can see I experimented with extendDuration() which does extend the spinning, but in the end the result is the same; the spinning wheel suddenly stops and the digit "0" is shown on the wheel.</p>
  
  <p><strong>need help:</strong></p>
  
  <p>How can I get a "WheelView" to spin through the numbers 0 .. 9 for a second and then slow down to a predetermined position ?</p>