bool TryInflate(ItemsEdge edge, Rect viewportWorldRect) { if (!_widgetsViewport.NeedInflate(edge, viewportWorldRect) || !_itemsViewport.TryInflate(edge)) { return(false); } int index = _itemsViewport.GetEdgeIndex(edge); _widgetsViewport.Inflate(edge, _itemsProvider.GetItemByIndex(index)); // Remove unnecessary element if the list was scrolled too much on this frame TryDeflate(ItemsEdgeDesc.Opposites[edge], viewportWorldRect); return(true); }
bool CheckItem(int index) { return(_itemsProvider.GetItemByIndex(index) != null); }