title: android Imageview layoutparams in dip?
body: <p>I'm using the following code :</p>
  <blockquote>
  <p>ImageView i = new ImageView(mContext);</p>
  <p>i.setImageResource(mImageIds[position]);</p>
  <p>i.setScaleType(ImageView.ScaleType.FIT_XY);</p>
  <pre><code>       //pixels settings !!!
  </code></pre>
  <p>i.setLayoutParams(new Gallery.LayoutParams(200, 100));</p>
  </blockquote>
  <p>but as you can see, it is setting the layout dimensions in pixels.</p>
  <p>Does anybody know how to do the same thing but in &quot;dip&quot; ?</p>