The scrollview has red background, so you can spot it, and the loaded layout is the one with all the text and the red button. As you can see it goes out of the red view when i scroll up
Why?
As default, a property 'Bounces' is turned on (at least in designer). Turn off.
I use following subroutine:
B4X:
Public Sub setScrollViewSize (scrollViewInstance As ScrollView, floatWidth As Float, floatHeight As Float, booleanBounces As Boolean)
scrollViewInstance.Panel.Width = floatWidth
scrollViewInstance.Panel.Height = floatHeight
scrollViewInstance.ContentWidth = scrollViewInstance.Panel.Width
scrollViewInstance.ContentHeight = scrollViewInstance.Panel.Height
scrollViewInstance.Bounces = booleanBounces
scrollViewInstance.ScrollTo (0, 0, False)
End Sub
As default, a property 'Bounces' is turned on (at least in designer). Turn off.
I use following subroutine:
B4X:
Public Sub setScrollViewSize (scrollViewInstance As ScrollView, floatWidth As Float, floatHeight As Float, booleanBounces As Boolean)
scrollViewInstance.Panel.Width = floatWidth
scrollViewInstance.Panel.Height = floatHeight
scrollViewInstance.ContentWidth = scrollViewInstance.Panel.Width
scrollViewInstance.ContentHeight = scrollViewInstance.Panel.Height
scrollViewInstance.Bounces = booleanBounces
scrollViewInstance.ScrollTo (0, 0, False)
End Sub