Is it possible to dynamically set the height of a ScrollView?
I have a series ListViews inside a ScrollView and would like to set the height of the ScrollView to the height of the ListView.
I have researched this and found it suggested to use data-stretch=true on the view and data-content-height="100%" on the ScrollView. When I do this and the ListView contains more items than will display on the screen, it does not scroll vertically. Example:
http://jsbin.com/fosoj/1/edit?html,output
I can hard code a content height on the ScrollView but it may be larger than necessary and it allows the ListView to scroll off the top of the page. Example:
http://jsbin.com/hatib/1/edit?html,output
I would appreciate any alternatives.
Thanks,
Kerry
I have a series ListViews inside a ScrollView and would like to set the height of the ScrollView to the height of the ListView.
I have researched this and found it suggested to use data-stretch=true on the view and data-content-height="100%" on the ScrollView. When I do this and the ListView contains more items than will display on the screen, it does not scroll vertically. Example:
http://jsbin.com/fosoj/1/edit?html,output
I can hard code a content height on the ScrollView but it may be larger than necessary and it allows the ListView to scroll off the top of the page. Example:
http://jsbin.com/hatib/1/edit?html,output
I would appreciate any alternatives.
Thanks,
Kerry