简体   繁体   中英

flex 4.1 s:List: how can i force the list to load all the items, not only the visible items?

I'm creating a facebook application in flex. I'm actually working on the friends component that shows your friends who are using the application. now, each friend has a profile image.

I created the component using as:List element.

In the Skin Class of the element i configured the requestedColumnCount to 3, which means it shows 3 friends. i added buttons to scroll left and right in the list.

Whenever I scroll to see a different friend, for a half of a second i see no image because the List component is loading the image in order to view it.

is there a way to make the list preload all the elements so i won't have this kind of problem ?

You can set useVirtualLayout on the List to false, which means it will no longer "recycle" the item renderers. You may still have a lag when the item renderers initially load the images. Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM