Skip to first unread message

Cheryl Davies

unread,
Feb 12, 2017, 3:58:58 PM2/12/17
to MIT App Inventor Forum
The main thing I want to know is: I think I'm doing the Image Height and Width correct, the thing is when I make the Image Height/Width big or small, then it stretches so how can I alter the size without it stretching. Also how can I position it on screen because I've tried X and Y block and I've tried Alignvertical as well Alignhorrizontal but still it won't position, it just keeps on messing my Height and Width up.
Do I need to apply my phone screen size on Paint before I create a drawing, for my painting to be sized and fit perfectly on my device.
Please help me I'm stuck!

SteveJG

unread,
Feb 12, 2017, 6:09:51 PM2/12/17
to MIT App Inventor Forum
Try these:






You might set both HandW on an Image control to Automatic; if that does not work then check the ScalePictureToFit box and that might solve your problem with scaling or you can note the size of the image you place into Media ... perhaps    300 x 250 pixels and set H and W pixels in the Image control appropriately

You might get more specific help if you can show a screen capture of what is perplexing..  To keep an image from "stretching"  you have to maintain the HxW proportions.   Say the original is 300 x 125
and you want to downsize it by half...the dimensions would be 150 x 62 (because 125 cannot be divided by 2 without a remainder and pixels require integer values).

If you know your phone screen size in pixels, you can make your image exactly the same if you want to use the image in the background.   Most inexpensive phone screens are 320 x 480 pixels; the screen on your device might be different.

....there were some hints; try experimenting a little more.  Remembering that using AI2's layout controls is NOT necessarily intuitive and you will need to learn what happens when you place an object into an arrangement because what happens can be affected not only by the dimensions of the object you place but also with the scaling you select for the arrangement (Automatic, Fill Parent, set exact pixels or a percentage of screen).

Regards,
Steve



Reply all
Reply to author
Forward
0 new messages