开发者

Using an AsyncImageView in android has a strange padding I can't remove

开发者 https://www.devze.com 2023-02-23 00:24 出处:网络
I\'m using the AsyncImageView from GreenDroid( https://github.com/kennydude/GreenDroid ) and it has made my view go all strange. It\'s in a TwoLineLayout (or whatever it\'s called), and it\'s showing

I'm using the AsyncImageView from GreenDroid( https://github.com/kennydude/GreenDroid ) and it has made my view go all strange. It's in a TwoLineLayout (or whatever it's called), and it's showing me some unexpected padding which using the ddms it's from the actual AsyncImageView itself and I can't figure out why it's there, because the image is correctly sized as the corners go on fine.

I've tried using all the ScaleTypes and don't like how Matrix zooms everything in. Here's the XML currently: http://pastebin.com/H1kFpiTM

Also bellow is a screenshot of what I get, 开发者_StackOverflowwhich you can see the strange gap.

Using an AsyncImageView in android has a strange padding I can't remove

Thanks in Advance,

Joe


For me, solution was :

image.setAdjustViewBounds(true);
image.invalidate();


I've fixed it! It's due to some new code which was "automatically" selecting the correct image size to download. It was incorrect and so the imageview was scalling the image to fit.

0

精彩评论

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