title: Runtime changing image position
body: <p>i am creating an app where I want to change position of my image (imageview) at runtime. I am not able to do it. I am using Linear Layout. Please can anyone give me specific code to do so. </p>
  
  <p>I tried following code (from stackoverflow) but dint work :</p>
  
  <pre><code>ImageView leaf = (ImageView)findViewById(R.id.imageView1);
  
  LayoutParams par = leaf.getLayoutParams();
  par.leftMargin += 30;
  
  leaf.setLayoutParams(par);
  </code></pre>
  
  <p>There was no method called setLayoutParams()</p>