title: Android ValueAnimator Sin wave
body: <p>I've got a Custom ViewGroup class and an image I've added to it. When the screen is tapped I want to animate the added image to travel across the screen in a wavelike pattern. What I have now is below but though the image moves in a wavelike pattern it jumps around too quickly and is a blur. How can I slow it down to move in a steady wave?</p>
  
  <pre><code>    ValueAnimator animator = ValueAnimator.ofFloat(0, 1); // values from 0 to 1
      if(animateImage) {
          incrementalValue = 0f;
          animator.setDuration(4000);
          animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
              @Override
              public void onAnimationUpdate(ValueAnimator animation) {
                  float value = ((Float) (animation.getAnimatedValue()))
                          .floatValue();
                  float amplitude = 100f;
                  mImage.setTranslationX(incrementalValue);
                  mImage.setTranslationY((float) (amplitude * Math.sin((incrementalValue) * Math.PI)));
                   incrementalValue += 5f;
              }
          });
          animator.setTarget(mImage);
          animator.start();
      }
  </code></pre>