♻️
Dynamic Recycler
  • What is Dynamic Recycler?
    • Demo Videos
  • CONCEPTS
    • Before Starting
    • Operating Flow
    • Data List
    • Advanced Implementations
      • ViewType Provider
      • DiffUtils
    • Common Concepts
  • DOCUMENTATION
    • Documentation
    • Method Blocks
    • Property Blocks
  • Get the Extension
    • Buy The Extension
Powered by GitBook
On this page
  1. CONCEPTS

Data List

PreviousOperating FlowNextAdvanced Implementations

Last updated 3 years ago

The component has to be bound to a list of data in order to render it.

The first binding of the component to a list of data is done through the Build block, the list remains bound to the component.

The component is not aware of changes being made to the list. That is, you can build a component with a list of 5 items, the component will render them, if later one more item is added to that list, the component will not render that new item. To get the component to render the items that are added, notification blocks are used.

In general, the block is going to tell the component that the list no longer has the same items and that it needs to completely re-render it.

If using DiffUtil, please also read DiffUtils

For smaller changes, such as inserting or deleting or changing an item, the respective blocks are used (, , ), which only render those small changes.

Link to another list

The advantage of notification blocks is that they allows to work with a single list in which modifications are made, on the other hand, if you want to change completely to another list, you should use the block.

After binding the component to another list, you can continue to use the same notification blocks as if the component had been built with that list.

NotifyItemInserted
NotifyItemRemoved
NotifyItemChanged
NotifyDataSetChanged
UpdateData