title: FrameLayout and setLayoutParams invalides my View
body: <p>I have a strange behaviour with a implementation of Canvas I am having.</p>
  
  <p>I am doing simple Canvas, draw something on it and all that's fine. But then, I put Button over that View (in a FrameLayout), like this:</p>
  
  <pre><code>FrameLayout frameLayout = new FrameLayout(this);
  FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT);
  layoutParams.setMargins(10, 10, 10, 0);
  button.setLayoutParams(layoutParams);
  </code></pre>
  
  <p>When 'setLayoutParams' is called, the whole View gets redrawn/invalidated. I don't understand why, but then I have problems because of this.
  It's not a problem to be called the first time, but the View is invalidated all the time when the 'setLayoutParams' is called. This causes some trouble later on.</p>
  
  <p>Maybe someone would suggest me some idea on how to avoid this?</p>