我知道這是有點晚,但其解決方案,我用了這個問題,希望它還是有幫助的。基本上,它涉及到將scrollView的不透明度設置爲0,直到完成加載。這意味着,而不是一次出現1的行,它們全部同時出現,並且可以在您的程序/用戶執行其他操作時在後臺運行。請注意,這只是工作,如果滾動視圖是空的 - 它不添加行到已有的東西在裏面滾動型很好的解決方案:
var sView = Titanium.UI.createScrollView({
//Whatever properties you need for your scrollView
opacity: 0,
});
//childViews is an array of all the stuff you'd like to add to sView
childCount = childViews.length
//Add a postlayout event to the last childView - this will automatically set the opacity to 1 when the last child is loaded
childViews[childCount - 1].addEventListener('postlayout', function showScrollView(e){
this.parent.setOpacity(1);
this.removeEventListener(showScrollView);
});
//Iteratively add each view in the array to the sView
for (var x = 0; x < childCount; x++) {
sView.add(childViews[x]);
}
window.add(sView);
是它的工作....意見=滾動視圖和所有其他子視圖到您的scrollView ...並最終將其添加到窗口。 – Thalaivar 2013-04-07 03:24:57