title: how to set image layout param in Gallery in android
body: <p>I want to use gallery in android so in adapter class I have set </p>
  
  <pre><code>    @Override
      public View getView(int arg0, View arg1, ViewGroup arg2) {
  
          ImageView iView = new ImageView(ctx);
          iView.setImageResource(pics[arg0]);
          iView.setScaleType(ImageView.ScaleType.FIT_XY);
          //iView.setLayoutParams(new Gallery.LayoutParams(150, 150));
          iView.setLayoutParams(new Gallery.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
          return iView;
      }
  </code></pre>
  
  <p>So it overlap all my image, it does not show properly one by one.</p>
  
  <p>but if I set </p>
  
  <pre><code>iView.setLayoutParams(new Gallery.LayoutParams(150,150));
  </code></pre>
  
  <p>then it does not overlap image but image size will increase..
  So What I have to do if I want to wrap content of image height width</p>
  
  <p>thanks</p>