title: Draw on android screen with fingers
body: <p>I am trying to create a drawing on the screen with the touch event. I am successful in doing the same. here is the code I am using for that</p>
  
  <pre><code>public class DrawView extends View implements OnTouchListener {
      private static final String TAG = "DrawView";
  
      List&lt;Point&gt; points = new ArrayList&lt;Point&gt;();
      Paint paint = new Paint();
  
      public DrawView(Context context) {
          super(context);
          setFocusable(true);
          setFocusableInTouchMode(true);
  
          this.setOnTouchListener(this);
  
          paint.setColor(Color.BLACK);
          paint.setAntiAlias(true);
      }
  
      @Override
      public void onDraw(Canvas canvas) {
          for (Point point : points) {
  
              canvas.drawCircle(point.x, point.y, 8, paint);
              // Log.d(TAG, "Painting: "+point);
          }
      }
  
      public boolean onTouch(View view, MotionEvent event) {
          // if(event.getAction() != MotionEvent.ACTION_DOWN)
          // return super.onTouchEvent(event);
          Point point = new Point();
          point.x = event.getX();
          point.y = event.getY();
          points.add(point);
          invalidate();
          Log.d(TAG, "point: " + point);
          return true;
      }
  }
  
  class Point {
      float x, y;
  
      @Override
      public String toString() {
          return x + ", " + y;
      }
  }
  </code></pre>
  
  <p>As you can see I am drawing a circle on every point the user touches. I am getting a continuos line/curve when user moves his finger slowly. But if the user moves his fingers fast I am not getting a continuous drawing. Instead a list of separated dots on the path the finger moved.</p>
  
  <p>How can I do this properly?
  Thanks</p>