Problem
The scroll content could change dynamically, but if it is very small, it wants to scroll anyway! The scroll height is fine, but it thinks its content is much larger then it actually is?
In iOS the Scrollview it won't scroll due to contents are very small.
Tested on
Testing on android
2.0.1GA2, 2.0.2.GA > Droid Razr 2.3.5
Testing on iOS
iOS 5 simulator
app.js
Titanium.UI.setBackgroundColor('#000');
var win = Titanium.UI.createWindow({
title:'window',
backgroundColor:'#fff'
});
var mainView = Ti.UI.createView({
layout: 'vertical',
top: 0,
width: '100%',
height: '100%'
})
var image1 = Ti.UI.createImageView({
width: 200,
height: 200,
image: "KS_nav_views.png"
})
var view = Ti.UI.createView({
backgroundColor: 'blue',
height: '100%',
layout: 'vertical'
});
var scroll = Ti.UI.createScrollView({
backgroundColor: "#444",
contentHeight: 'auto',
contentWidth: 'auto',
height: '50%',
width: '100%',
showVerticalScrollIndicator : true,
layout: 'vertical',
top : 0
});
view.add(scroll);
var label = Ti.UI.createLabel({
text: 'why does this scroll?'
});
scroll.add(label);
var image2 = Ti.UI.createImageView({
width: 200,
height: '25%',
image: "KS_nav_ui.png",
bottom : 0
});
win.add(mainView);
mainView.add(image1);
mainView.add(view);
win.add(image2);
win.open();
@Paul Hamilton I've pulled a CI build to test this out. The scrollView area doesn't scrolls anymore (likewise iOS 5 - tested on simulator).
Specifically this is the CI build tested on
Having said that, the one can be grab here: http://builds.appcelerator.com.s3.amazonaws.com/index.html I'll leave this open for a while in case you have further questions or some more clarifications.
Just tested this with 2.0.2.GA and this is still occurring in the android emulator. Tested using 2.3.3 and 2.2 API. with both 480/320 and 800/480 resolutions.
I see what you mean originally. I have never used a CI build before thus i must appologize. I just updated to the most recent 'stable' version (2.0.2). The scrolling issue does seem to be behaving appropriately with CI build 2.1.0.v20120614102250. CI Builds shouldn't give too much trouble i hope? This was giving me major issues with my layout design and using scrollviews that didn't take up the whole screen, but which had to be there when scrolling did occur. Keep up the good work. This can be marked as resolved in 2.1 i think.
This issue has most likely been fixed by another layout PR. Marking it resolved based on filer's comments.
Titanium Studio: 2.1.0.201206221045 Mobile SDK: 2.1.0.v20120622174154 OS: X Lion Device: Samsung Galaxy Can't reproduce it. No scrolling bar because there is no contents.