2014년 12월 10일 수요일

how to scroll screen down when I have long canvas image

I add canvas to the page
and I attached a long image to it (image with long text)
I marked screen1 as scrollable but I cant scroll the page down (to see the rest of the image) when I tested in my phone
in app inventor scrolling is work but not in the phone



The Canvas itself does not scroll.  To be able to scroll a long Canvas the screen needs to have a white margin on the left or the right of the screen...you use that space to 'scroll' on the regular screen (remember to set screen scrollable on the Designer Properties).  In practical terms, if as in your case you have a very long image (one with the height very long, you have to make sure the Width is not greater than the screen width of the device you will run the app on.



the canvas can't be longer than the screen
you could use the webviewer to display your very large image instead, see an example here https://puravidaapps.com/snippets.php#2ani



I didnt succeed 
I did the following:

when screen1 initilize do
set canvas.width to screen1.width - 1


댓글 없음:

댓글 쓰기