I am using the following code:
ImageView i = new ImageView (mContext);
i.setImageResource (mImageIds [position]);
i.setScaleType (ImageView.ScaleType.FIT_XY);
i.setLayoutParams (new gallery .LayoutParams (200, 100));
but, as you can see, it sets the dimensions of the layout in pixels.
Does anyone know how to do the same thing, but in "dip"?
source share