I have an Android Application, where I have an ImageView
, I need to keep the size constant, there can be various images that I need to put into this ImageView
Try this
ImageView img
Bitmap bmp;
int width=100;
int height=100;
img=(ImageView)findViewById(R.id.imgView);
bmp=BitmapFactory.decodeResource(getResources(),R.drawable.image);//image is your image
bmp=Bitmap.createScaledBitmap(bmp, width,height, true);
img.setImageBitmap(bmp);
Or If you want to load complete image size in memory then you can use