I'm having a problem with Native Scrollers on Android devices (4.x; Galaxy 5; Nexus 7) using LiveCode 7.01 rc3.
The issue is that I can scroll all the way down, but I can never scroll all the way back to the top.
This code:
Code: Select all
local sScrollerID
on preOpenCard
local tScrollerRect, tContentRect
if environment() is not "mobile" then exit preOpenCard
put the rect of group "scrollArea" into tScrollerRect
put the left of field "Entry",the top of field "Entry",the right of field "Entry",the bottom of field "Entry" into tContentRect
mobileControlCreate "scroller", "loremScroll"
put the result into sScrollerID
mobileControlSet "loremScroll", "rect", tScrollerRect
mobileControlSet "loremScroll", "contentRect", tContentRect
mobileControlSet "loremScroll", "visible", true
mobileControlSet "loremScroll", "scrollingEnabled", true
mobileControlSet "loremScroll", "vIndicator", true
mobileControlSet "loremScroll", "vscroll", 0
end preOpenCard
on closeCard
if environment() is not "mobile" then exit closeCard
mobileControlDelete sScrollerID
end closeCard
on scrollerDidScroll hOffset, vOffset
set the vScroll of group "scrollArea" to vOffset
end scrollerDidScroll
I'd be ever so grateful if someone can provide some advice as to how I can fix this problem.
Peace.
Joel