This section explains the operation of the component in detail.
DynamicRecycler comes from the dynamic components family, which means it has all the features of the dynamic component.
The main function of the component is to efficiently render any amount of data. The process that follows and its operation will be detailed in this section.
The number of objects generated and rendered by the component (henceforth visible objects) is not equal to the number of objects in the data list. For example, if the component is told to render a list of data with a size of 500 objects, the component will create and render only (assuming that is the case) 5 visible objects which will constantly be recycled or reused. How this is possible will be explained in more detail later.
As explained above, the component recycles the visible objects that it initially generates. This is done by the internal API, which is responsible for analyzing the measurements that the component has (width and height) and the measurements that each visible object that it will later generate needs. Based on its analysis, will create the necessary visible objects.
The component is scrollable, that is, when the user slides over it, it shows items as it scrolls.
As seen above, the component has created three visible objects numbered 1,2 and 3. When the user moves the component, the items are constantly leaving and entering the screen, they are the same visible objects created that are constantly being repositioned.
The same operation works for all ways of distributing objects, whether horizontally, vertically, in a list, in grid view.
The developer's task is only to implement procedures to create and edit the visible objects. and if desired, implement more features depending on what you want to achieve.