title: How to set layout_width of an image pragmatically in android
body: <p>I am trying to set layout_width to FILL_PARENT to an image view. I am using following code:: </p>
  
  <pre><code>    ImageView image = new ImageView(mContext);
                     image.setImageResource(R.drawable.my_ac_line);
                     LayoutParams lp = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
                     image.setLayoutParams(lp);
                     layout.addView(image);
  </code></pre>
  
  <p>But its not working.</p>
  
  <p>Can any please suggest me the answer for it.</p>
  
  <p>Thanks in advance.</p>