开发者

How works android ImageView android:scaleType="fitXY" property?

开发者 https://www.devze.com 2023-01-13 04:44 出处:网络
I need to know how he takes drawable object. I\'m collecting some ImageView objects in array, they hav开发者_如何学Goe background images that are rather big in resolution so they take lot of memory...

I need to know how he takes drawable object. I'm collecting some ImageView objects in array, they hav开发者_如何学Goe background images that are rather big in resolution so they take lot of memory... I have read somewhere that it will automatically create image with resolution that my imageView have, so i think it will take less memory than first one... Please tell me, if i set scaleType property, will it scale that image? Will that help me to save memory?


It won't save you any memory to set the scaleType of the ImageView because the original backing Bitmap will still remain, regardless of which scaling you choose. Since you can resize or change the scale type dynamically there's no optimization that the ImageView can make with regards to image size.

0

精彩评论

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