Anyone else having a problem with scrollView? When I build my application containing a scrollView with varying text length to display, it works perfectly in IOS, but when I build for Android and test on an Android device it doesn’t work properly. If the inserted text object is less than or 2 times the scrollView.height it works as desired, however once the text object height is approximately greater than 2 times the scrollView.height it doesn’t work properly. In this case, if I scroll UP it will scroll off the “screen” regardless of whatever bottom padding value I use.
Any ideas out there?
Here is the code I’m using if that helps.
[lua]
local stringVar = “Some amount of text from 5 to 200 lines”
local textToViewObject = display.newText(sceneGroup,stringVar,0,0,300,0,“Helvetica”,16)
local scrollView = widget.newScrollView
{ left = 0,
top = 0,
width = display.contentWidth,
height = display.contentHeight / 2,
scrollWidth = display.contentWidth,
topPadding = 10,
bottomPadding = 25,
horizontalScrollDisabled=true,
verticalScrollDisabled=false,
backgroundColor = { 1,1,1 },
}
sceneGroup:insert(scrollView)
scrollView.anchorX=0; scrollView.x = 5;
scrollView.anchorY=0;
scrollView.y = display.contentWidth/2, – positions under animation on top half of display
textToViewObject:setFillColor(0,0,0) --black text
textToViewObject.x, textToViewObject.y = display.contentCenterX, textToViewObject.height/2
scrollView:insert(textToViewObject)
[/lua]