I have a scrollView inside a window.
To this scrollView I will add 3 views, all with variable heights.
When I set the height of the scrollView to 'auto' it will never scroll and show the views that are outside the windowview.
However, if I add a height of, for example, 500 to it, it will show me the views outside the scope of the windows' height.
What am I doing wrong? Is this a bug?
Got it, the height should just be 460 if you want it to fit in the bounding box of the whole window. That makes sense :)
Try to use
myScrollView.contentHeight = 'auto';
By setting a set height and width of the content I'm adding the the scrollview and not setting dimensions for the scrollview, I was able to get it to display correctly.
I used Ti.Platform.displayCaps.platformHeight and platformWidth for the dimensions of my added content, a tableview in my case. You can turn these into percentages by multiplying them by a float number between 0 and 1.
Setting the scrollview dimensions without setting tableview dimensions caused it to shrink to odd dimensions and not display right. (This is on TiMobile 1.6.1 and Android 1.6)
This comment was also posted here.