Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 bool CheckItem(int index)
 {
     return(_itemsProvider.GetItemByIndex(index) != null);
 }