开发者

How to resize image from Uri?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜