Get Scrollview contentHeight
Dear People,
I was wondering if it's possible to get the value of the dynamic filled scrollview (im filling it with a webview and a imageview).
I'm setting the contentHeight to 'auto' and when i'm trying to get the actual size of the contentHeight it still gives me 'auto'.
Is there a solution?
3 Answers
- 
				
					
did you try leaving the contentHeight property empty?
a Workaround could be using the scroll Event and check if it gives the right height. - 
				
					
If you want the height:
scroll.getSize().height;If you want the contentHeight:
var cnt = scroll.children.length; var lastChild = scroll.children[cnt-1]; var cHeight = (lastChild.center.y + (lastChild.getSize().height / 2)) - scroll.getSize().height; - 
				
					
People i fixed it by detecting the height of the webview whitin it!
myTimer = setInterval(function () { actualHeight = text.evalJS("document.height;"); if(actualHeight > 10) { } },100);