title: Android: change LayoutParams of View added by WindowManager
body: <p>I have overlay <code>View</code> managed by <code>WindowManager</code>, just like in <a href="http://goo.gl/OD1ij" rel="noreferrer">this question</a>.</p>
  
  <p>Briefly, it looks like this:</p>
  
  <pre><code>WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
  my_view_layout_params = new WindowManager.LayoutParams(
         WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
         WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
         PixelFormat.TRANSLUCENT);
  
  wm.addView(my_view, my_view_layout_params);
  </code></pre>
  
  <p>It works, but if i need to change layout params, i need to remove View and add it again, like that:</p>
  
  <pre><code>wm.removeView(my_view);
  wm.addView(my_view, my_view_layout_params);
  </code></pre>
  
  <p>It looks not very beautiful. I tried to do <code>my_view.setLayoutParams(my_view_layout_params)</code>, but it does not work unfortunately. How can i do it?</p>