title: Android ImageView slow, is there a easy way to speed it up?
body: <p>The following code draws a graph with differrent colors for each point (color selection is in (...) which is umimportant here).<br>
  I have this attached to an onTouchListener which changes the Vector which hold the variables x,y,z. One "onTouch" changes points then updates the view with updateView(). The size of the vector wich holds x is about 300 elements. The array which holds y is about 200. Which makes it 200*300 loops inside the updateView() method for every onTouch event.
  I tried to implement a wait method before the next onTouch is triggered, but its still to slow.</p>
  
  <p>Any ideas ?</p>
  
  <pre><code>public updateView(){
  
          bitmap = Bitmap.createBitmap((int) width, height - nextToCurve.getHeight(),
                  Bitmap.Config.ARGB_8888);
          canvas = new Canvas(bitmap);
          paint = new Paint();
          paint.setColor(Color.GREEN);
          imageView.setImageBitmap(bitmap);
          canvas.drawColor(Color.BLACK);
          (...)
          //x
          for(int i5=start;i5&lt;stop;i++){
          //y
          for(int i=blockSizeSmall-minBlockSize;i&gt;minBlockSize;i--){
                     //change color for z
                     (...)
                     canvas.drawLine(oldX, oldY, temp3, temp4, paint);
                     canvas.drawPoint(x,y, paint);
          }
          imageView.postInvalidate(); 
  }
  </code></pre>