title: How can I change layout params while program is running
body: <p>I have an ImageView sitting on a FrameLayout. I want to be able to move this imageView by setting a margin:<br>
  <code>LayoutParams lp = new FrameLayout.LayoutParams(WRAP_CONTENT, WRAP_CONTENT);</code><br>
  <code>lp.setMargins(left, top, 0, 0);</code><br>
  <code>imageView.setLayoutParams(lp);</code><br>
  <code>imageView.invalidate();</code><br>
  However nothing changes and my imageView does not move. <br>What am I doing wrong? <br>Do I need to be doing something different other than <code>imageView.invalidate()</code> after I set new margins?</p>