I set the default size of an imageview as width=511 and height=385 .
Source of the imageview is from drawable.
Based on a dynamic value I need to change the size of the image view or the image fit in to it.
For example I want to change the size of the imageview or image inside it to width=140 and height=100
ImageView scale=(ImageView) findViewById(R.id.scaleimage);
If you set the width and height attributes of your ImageView to specific values, the system will automatically scale you images to fit.
Unless I don’t understand your question, I think it is as simple as:
To set this in code, try: