开发者

How to resize image from Uri?

开发者 https://www.devze.com 2023-01-03 21:23 出处:网络
I\'m retrieving an image from a URI and displaying it in an Imageview. I need to re-size the image 开发者_Go百科from the URI to fit the size of the Imageview.

I'm retrieving an image from a URI and displaying it in an Imageview.

I need to re-size the image 开发者_Go百科from the URI to fit the size of the Imageview.

Please help me. How I can do this?

Thanks


imageViewObject.setScaleType(ImageView.ScaleType.CENTER_INSIDE);

Or, if you are configuring the ImageView from the XML file, you can use this property:

android:scaleType="centerInside"
0

精彩评论

暂无评论...
验证码 换一张
取 消