title: Setting of ImageView's gravity to the center in android programmatically
body: <p>I want to set the gravity of an array of Imageviews,ImageIcons[i] to the center with the following code,    </p>
  
  <pre><code>ImageIcons[i] = new ImageView(this);
  ImageIcons[i].setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
  LayoutParams.WRAP_CONTENT));
  layout.addView(ImageIcons[i]);
  </code></pre>
  
  <p>And I am stuck up while setting the gravity.I request the SO people to guide me on this.</p>
  
  <p>Thanks</p>