Monday, March 3, 2014
imageview's a problem
A control imageview, which put a 100 * 100 pixel image, and then I set it's width and height are wrap_content, after running this picture is not found 100 * 100, but bigger, this is what happens ? Solving ~<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Figuratively, if the resolution of your device is hdpi, pictures on just under drawable-hdpi directory, then the picture is displayed with the same size as the original image.
If your device resolution is hdpi, image only on the drawable-mdpi directory, the width and height will be amplified, the multiplier 240 is divided mdpi hdpi 160, which is enlarged by 1.33 times.
If your device resolution is mdpi, image only on the drawable-hdpi directory, the width and height will be reduced, the multiplier 160 is divided hdpi mdpi 240, the original image is reduced to 0.67 times.
This is a strategy adapted to different resolutions Android.
Reply:
Upstairs positive solution! !
Reply:
Well, indeed, before the resources put too chaotic, it seems to pay attention after the next, thanks Ha!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment