I am targeting mobile using FlashBuilder, I am using TileLayout to view items of data, I am setting useVirtualLayout to "true"
I have some questions please:
- Is item renderer resued by default? or shall I set it to true my self?
- How can I control the range of items being virtualized?
- Is there any tips on boosting performance of building child items of
TileLayout?
If native TileLayout is slow, is there alternative control to use? if building my own would be better, is there any example to build custom layout?
ItemRendererleaves theviewportof the parentListcontrol. So if you have a list on a page and that page is controlling the scrolling and not the list, I don't believe virutalization occurs. That is what I have seen in the past. Not sure if that is how it actually works, but that is the impression I have gotten. Easy way to find out is to throw a trace statement in yourDataChangehandler. If it traces out after initialization, you know virtualization is workingTileLayoutitself is likely not the issue you are having, it is theItemRenderer.ItemRendererclass exceptLabelItemRendererandIconItemRenderer.DisplayObject. Instead, overridecreateChildren()and do it there. OverridelayoutContents()for positioning and sizing. OverridedrawBackground()for handling the background. I highly suggest reading this post from Flextras (you'll see him going by Reboog77 on SO) about writing mobile item renderers. https://www.flextras.com/blog/index.cfm/2011/6/24/Building-a-Mobile-ItemRenderer-in-FlexGraphicsclass, do that instead of using aRector similar.ContentCachefor any images outside of theiconDisplayinIconItemRenderer. ContentCache will negate the need for reloading images every single time.(iconDisplay/iconalready utilizes this by default)