I have a list with variableRowHeight as "true" and useVirtualLayout as "true". I am having 5 items in list. four of them have height of 40px while one of them has only 10px.
Now the height of list showing on screen is 40x5 = 200px. But I want 40x4 + 10x1 = 170px.
I extended list class and overrided measure function as:
override protected function measure():void
measuredHeight = measuredHeightOfItems();
private function measuredHeightOfItems():Number
var mHeight:Number = 0;
for (var itemIndex:int = 0; itemIndex < dataGroup.numChildren; itemIndex++ )
var e:DisplayObject = dataGroup.getChildAt(itemIndex);
mHeight += e.height;
Now whenever any item is removed from list, it still shows numChildren as unupdated.
Retrieving data ...