1

I have an imageview that loads and image in the xml.

I was wonder, how can I programmatically increase the image size ( or reduce it) by scale of 2? (so double it or make it half size)

Please help Thanks

Snake
  • 14,228
  • 27
  • 117
  • 250
  • What kind of image is it? Bitmap? You can look into [`createScaledBitmap`](http://developer.android.com/reference/android/graphics/Bitmap.html#createScaledBitmap%28android.graphics.Bitmap,%20int,%20int,%20boolean%29) – bill-x Jun 23 '12 at 19:36
  • 1
    It is a drawable. As I said I would like to call a method or something on an ImageView – Snake Jun 24 '12 at 04:02
  • Ah, so like using `layoutParams`? [Example](http://stackoverflow.com/questions/2965662/how-do-you-setlayoutparams-for-an-imageview). Then you can look into [`setScaleType`](http://developer.android.com/reference/android/widget/ImageView.html#setScaleType%28android.widget.ImageView.ScaleType%29) to get the drawable to scale better – bill-x Jun 24 '12 at 19:57

0 Answers0