title: Android drawing a line to follow your finger
body: <p>What I want to do is to draw a line that will follow my finger.  I've created 
  a custom view, and I have an <code>onTouchEvent()</code> that works.</p>
  
  <p>I can draw a static line in the <code>onDraw()</code> method without much trouble.  </p>
  
  <p>I'm not really sure how to get the line to draw as my finger moves though.</p>
  
  <pre><code>  public boolean onTouchEvent(MotionEvent event) {
          super.onTouchEvent(event);
          switch (event.getAction()) {
          case MotionEvent.ACTION_DOWN: {
              Log.e(TAG, " - DOWN -");
              Log.e(TAG, " getX: " + event.getX());
              break;
          }
          case MotionEvent.ACTION_UP: {
              Log.e(TAG, " - UP -");
              Log.e(TAG, " getX: " + event.getX());
              break;
          }
          }
          return true;
      }
  </code></pre>
  
  <p>Any hints you guys who have been doing it a while can give?  </p>
  
  <p>Do I need to set coordinates on the <code>onTouchEvent()</code> and constantly invalidate the view
  so the little line segments draw?</p>
  
  <p>In the end I just want to be able to basically doodle on the screen using my finger for 
  this experiment.  </p>