How to resize an image from Uri?

I am extracting an image from a URI and displaying it in Imageview.

I need to resize the image from the URI to fit the size of the Imageview.

Please help me. How can i do this?

thank

+3
source share
1 answer
imageViewObject.setScaleType(ImageView.ScaleType.CENTER_INSIDE);

Or, if you are configuring ImageViewfrom an XML file, you can use this property:

android:scaleType="centerInside"
+1
source

Source: https://habr.com/ru/post/1750843/


All Articles