example code:
var win = Ti.UI.createWindow({backgroundColor: 'black'}); var scrollableview = Ti.UI.createScrollableView({ top: 0, height: 300, cacheSize: 10, }); var webview = Ti.UI.createWebView({ html: '<html><head></head><body><script>var now = Date.now(); document.body.innerHTML = now;</script></body></html>', top: 0, height: 300 }); webview.addEventListener('load', function(){ alert('The webview is loaded!'); }); var b = Ti.UI.createButton({ title: "add new view", top: 400 }); b.addEventListener("click", function(){ scrollableview.addView(Ti.UI.createView()); }); win.add(scrollableview); scrollableview.addView(webview); win.add(b); win.open();as you can see, every time when adding a view to the scrollableview the webview is reloading.
is it possible to prevent this behaviour? because it is really unnecessary.
thank you!