How to animate diagrams in android using seeker bar
<p>I am looking for a way to use a seeker bar as a slider to move lines up and down the screen so as to be  able to create animated graphs.
At the moment I have got this far:</p>

<p>I have created an activity which uses main layout. 
On this main layout is a seeker bar and a custom view called graph. 
I have referred to the Graph class by using:</p>

<pre><code>&lt;com.mypackagename.Graph
Android:id=”@+id/graph”/&gt;
</code></pre>

<p>I have created a corresponding Graph class which extends View and in it I have drawn a red horizontal line using:</p>

<pre><code>@Override public void onDraw(Canvas canvas){ 

paint = new Paint(); 
paint.setARGB(255, 255, 0, 0); 
paint.setStrokeWidth(2); 
paint.setStyle(Style.STROKE); 
canvas.drawLine(0, 200, 200, 200, paint); 

          }
</code></pre>

<p>My problem is how can I get the seeker bar to update this line?</p>

<p>I have written code for the seeker bar as follows:</p>

<pre><code>my_seekerbar.setOnTouchListener(new SeekBar.OnTouchListener() 
{ 
    public boolean onTouch(View v, MotionEvent arg1) 
    { 
        View parent = (View)v.getParent(); 
                       SeekBar seekBar = (SeekBar)v; 
            int progress = seekBar.getProgress(); 



        } 
        return false; 
     } 
}); 
</code></pre>

<p>I am trying to use the value of progress to set the y-co-ordinate of my line.
I have been wrestling with this problem for a long time.
Am I on the wrong track?</p>
