title: Canvas Orientation Change Scaling Android
body: <p>I'm developing an painting app at the moment for the first time. I can draw and such things.
  But everytime the orientation changes, everything is lost. How can i fix this? I have been searching on the internet for solution but dont seem to find one. I know it has to to with the onSizeChanged event from the view class. I have overriden that event and changed a lot to make it work with the orientation change but i cant get it to work.
  Here is the code from the onSizeChanged event:</p>
  
  <pre><code>private Canvas drawCanvas;
  private Bitmap canvasBitmap;
  
  @Override
  protected void onSizeChanged(int w, int h, int oldw, int oldh) {
      //View given size
      super.onSizeChanged(w, h, oldw, oldh);
      canvasBitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
      drawCanvas = new Canvas(canvasBitmap);
  }
  </code></pre>
  
  <p>I have already tryed android:configChanges. But it doesnt seem to work.</p>