title: view.invalidate() ignored after configuration change
body: <p>after one year of using SO to solve my questions, I came to a problem for which I cannot find solution.</p>
  
  <p>I am using multiple threads to calculate bitmap. When new row of bitmap is calculated, I update custom view and call invalidate(). But when I rotate my phone, bitmap stops updating. After another screen rotation View is updated only once, and part of bitmap that was calculated in the meantime is also visible.</p>
  
  <p>part of onCreate method:</p>
  
  <pre><code>        view = (MyView) findViewById(R.id.view1);
  
      if (savedInstanceState != null)
      {
          bitmap = savedInstanceState.getParcelable("bitmap");
          view.bitmap = bitmap;
      }
      else
      {
          bitmap = Bitmap.createBitmap(400, 500, Bitmap.Config.ARGB_8888);
          bitmap.eraseColor(Color.GRAY);
          view.bitmap = bitmap;
      }
  </code></pre>
  
  <p>I use <code>handler</code> to update my view:</p>
  
  <pre><code>        public void handleMessage(final Message msg) {
  
          Log.i("Recieved", "redraw signal");
          view.bitmap = bitmap;
          view.invalidate();  
      }
  </code></pre>
  
  <p>In my view, i use:</p>
  
  <pre><code>       Bitmap bitmap;
     Rect rect;
  
     //...constructors
  
     @Override
     protected void onSizeChanged (int w, int h, int oldw, int oldh)
     {
         rect = new Rect(0, 0, getWidth(), getHeight());
     }
  
     @Override
     protected void onDraw(Canvas canvas)
     { 
         super.onDraw(canvas);
         if (bitmap!=null)
         {               
             canvas.drawBitmap(bitmap, null, rect, null);
         }
          Log.i("onDraw", "draw"); 
     }
  </code></pre>
  
  <p><strong>Solution</strong></p>
  
  <p>So far, I have found one solution. If I add <code>invalidate()</code> to the end of <code>onDraw</code>, bitmap is corectly updated(row by row) after screen orientation change. I don't think this is very "clean" solution, so I would like to understand why is <code>invalidate()</code> called from <code>handler</code> ignored after config change?  </p>
  
  <p>Thanks!</p>