0
votes

I have a titanium scrollview with the following properties:

var view = Ti.UI.createScrollView({
    height: '100%',
    width: '100%',
    contentHeight: 'auto', 
    backgroundColor: '#fff'
});

Initially, I don't add quite enough content to it to make it scroll. However, if the user presses a button, it adds a tableview row that should extend beyond the bottom of the screen, making the scrollview scrollable.

However, when the user click's the add button, which should add a row of height 150, a row gets added that is only tall enough to extend to the bottom of the screen, leaving the scrollview still unscrollable.

I tried changing the layout from composite to vertical, which on the surface fixes the problem, but there still seems to be a maximum height and everything after that gets cut off.

How can I add a row to the bottom of the scrollview and actually have titanium add the whole row?

1
Do I understand you correctly that there is a TableView inside the ScrollView? It sounds a bit like you are adding a TableViewRow to a ScrollView...mwfire

1 Answers

0
votes

It turns out that the appendRow method wasn't calling a relayout on UI elements and therefore the scrollview wasn't checking whether it should now be scrollable.

However, changing the method to insertNewRow did seem to update the scrollview and it allows scrolling.