CollectionViewItemFrame
Represents the position and dimensions of an item in a CollectionView.
Each item in the collection has a corresponding frame that defines where it should be positioned and how large it should be. The CollectionView uses this information to:
- Determine which items are visible
- Position item views correctly
- Calculate content size for scrolling
Frames are managed internally by CollectionView and its layout. The data source provides width/height, while the layout sets x/y positions.
Instance Members
The X coordinate of the item's position within the content area. Set by the layout during positioning.
The Y coordinate of the item's position within the content area. Set by the layout during positioning.
The width of the item in pixels. Should be set by the data source in collectionViewItemFrameAtIndex().
The height of the item in pixels. Should be set by the data source in collectionViewItemFrameAtIndex().
Whether this item is currently visible in the viewport. Managed internally by CollectionView based on scroll position. When false, the associated view may be recycled.
The view currently displaying this item, if any. Will be null for items that are not visible or when using lazy loading. Managed internally by CollectionView's view recycling system.
Creates a new item frame with the specified dimensions.
Name | Type | Description |
---|---|---|
x |
Float | Initial X position |
y |
Float | Initial Y position |
width |
Float | Item width |
height |
Float | Item height |
Private Members
Returns a string representation of this frame for debugging.
Returns | Description |
---|---|
String | String in format "Frame(x=X y=Y w=WIDTH h=HEIGHT)" |
Metadata
Name | Parameters |
---|---|
:allow |
ceramic.CollectionView |