Hi!
I’m new to Corona and I was wondering how I should prevent white bars to appear when you drag a scrollview too far. On one project I managed to do it by setting a negative bottomPadding, but that is probably not the way it was intended.
Here is an example:
local scrollView = widget.newScrollView { -- i want to cover all the screen x = display.contentCenterX, y = display.contentCenterY, width = display.contentWidth, height = display.contentHeight, -- size of background image scrollWidth = 800, scrollHeight = 1200, topPadding = 0, bottomPadding = 0, } sceneGroup:insert( scrollView ) local background = display.newImageRect( sceneGroup, "testBackground.png", 800, 1200 ) -- position to the middle background.x = 400 background.y = 600 scrollView:insert( background )
When I scroll the image, I cant go out of the 1200x800 image and see a white border. When I release, the scroll goes back to the bottom of the image and the white zone is hidden. I would like the scroll to stop at the end of the 1200x800 image, so no blank zone would be visible.
What am I doing wrong ?
Thanks,
Ben