In Android, FIT_XY crops my image slightly -
I have a (virtual version) version in a png on a large scale, and when a ImageView < / Code> with
FIT_XY
this cropped up and a little squire, any thoughts appear?
Random layout layout = new relative layout (this); Layout.setLayoutParams (New Layout Paramams (80, 80)); ImageView img = New ImageView (this); Img.setImageResource (R.drawable.myimg); Img.setLayoutParams (New Layout Paramams (80, 80)); Img.setScaleType (ImageView.ScaleType.FIT_CENTER); / / FIT_XY also tried img.setAdjustViewBounds (true); Layout.addView (img); Try to use fixed size (specify height and width) and type of fit_ center scale or
Comments
Post a Comment