♻️
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
  • Build
  • CanScrollHorizontally
  • CanScrollVertically
  • CreateGridManager
  • CreateLinearManager
  • CreateStaggeredGridManager
  • GetComponentPosition
  • NotifyDataSetChanged
  • NotifyItemChanged
  • NotifyItemInserted
  • NotifyItemRemoved
  • ScrollTo
  • SetContentComparator
  • SetEmptyComponent
  • SetHasFixedSize
  • SetItemComparator
  • SetLayoutManager
  • SetScrollChangedListener
  • SetScrollStateListener
  • SetViewEditor
  • SetViewProvider
  • SetViewTypeProvider
  • SmoothScrollTo
  • UpdateData
  • UseDiffUtil
  1. DOCUMENTATION

Method Blocks

Build

Initializes the component with the specified data list.

Params

Name
Type(s)
Def. value

with

data

List

-

CanScrollHorizontally

Return Type: Boolean

Returns whether the component can scroll horizontally to the indicated side.

Name
Type(s)
Def. value

with

-

direction

-

*

Boolean

-

CanScrollVertically

Return Type: Boolean

Returns whether the component can scroll vertically to the indicated side.

Name
Type(s)
Def. value

with

-

direction

-

*

Boolean

-

CreateGridManager

This block creates and returns a new Grid Layout Manager, which will display the component as a grid view.

Name
Type(s)
Def. value

Number

-

horizontal

Boolean

-

reverse

Boolean

-

Boolean

-

*

LayoutManager

-

CreateLinearManager

This block creates and returns a new Linear Layout Manager instance, which will display the component as a List.

Name
Type(s)
Def. value

horizontal

Boolean

-

reverse

Boolean

-

Boolean

-

*

LinearLayout

-

CreateStaggeredGridManager

Creates and returns a new StaggeredGridLayoutManager instance, which will allow to display the component as a Staggered Grid layout

Unlike the GridLayoutManager, this manager does not necessarily need the items to have the same size, since it can display them depending on their content.

Name
Type(s)
Def. value

Number

-

horizontal

Boolean

-

reverse

Boolean

-

GetComponentPosition

Returns the position of any component that is inside the recycler component.

Name
Type(s)
Def. value

with

-

component

Component

-

*

Number

-

NotifyDataSetChanged

Notifies the component that the linked list has changed.When notified, the component will be visibly updated.

To understand notification blocks, visit Data List

Name
Type(s)
Def. value

with

-

NotifyItemChanged

Notifies the component that only an item in the linked list has changed.When notified, the component will visibly update that item (if it is visible on screen)

To understand notification blocks, visit Data List

Name
Type(s)
Def. value

with

-

position

Number

-

NotifyItemInserted

Notifies the component that an item was inserted into the linked list, the result will be visibly reflected.

To understand notification blocks, visit Data List

Name
Type(s)
Def. value

with

-

position

Number

-

NotifyItemRemoved

Notifies the component that an item was removed from the linked list, the result will be visibly reflected.

To understand notification blocks, visit Data List

Name
Type(s)
Def. value

with

-

position

Number

-

ScrollTo

Causes the component to quickly scroll to the specified position.

Name
Type(s)
Def. value

with

-

position

Number

-

SetContentComparator

This property works with DiffUtils

It establishes the procedure in charge of carrying out the task of comparing the content of each item in the list.

contentComparator: Procedure Name

The parameters of the procedure must be the following:

  • id (ID of the RecyclerView required by the procedure)

  • oldItem: Previous item to be compared

  • newItem: New item to be compared

Type(s)
Def. value

with

-

contentComparator

Text

-

SetEmptyComponent

Sets a component to display when the recycler component is empty.

Params

Name
Type(s)

with

component

Component

SetHasFixedSize

Specifies whether the size of the component is dependent on the size of each item. With FixedSize enabled, the component will think all visible objects are of the same size and therefore the size (width or height) of the component will not be affected. This feature is not mandatory but using it will improve the fluidity of the widget.

Name
Type(s)
Def. value

with

-

hasFixedSize

Boolean

-

SetItemComparator

This property works with DiffUtils

It establishes the procedure in charge of carrying out the task of comparing each item in the list.

Unlike ContentComparator, the RecyclerView already has an ItemComparator implementation so it doesn't need to be set.

Visit DiffUtils to get more information

itemComparator: Procedure Name

The parameters of the procedure must be the following:

  • id (ID of the RecyclerView required by the procedure)

  • oldItem: Previous item to be compared

  • newItem: New item to be compared

Name
Type(s)
Def. value

with

-

itemComparator

Text

-

SetLayoutManager

Changes the layout manager of the component.

Name
Type(s)
Def. value

with

-

layoutManager

-

SetScrollChangedListener

Set a procedure that will be notified of the component's scroll change.

scrollChangedListener: procedure name

The parameters of the procedure must be the following:

  • id (ID of the component required by the procedure)

  • x: The displacement in the X axis (horizontal)

  • y: The displacement in the Y axis (vertical)

Name
Type(s)
Def. value

with

-

scrollChangedListener

Text

-

SetScrollStateListener

Sets a procedure that will be evaluated each time the component's scroll state changes.

scrollStateListener: procedure name

The parameters of the procedure must be the following:

  • id (ID of the component required by the procedure)

Scrolling has three states: idle, settling and dragging

Name
Type(s)
Def. value

with

-

scrollStateListener

Text

-

SetViewEditor

Sets a procedure in charge of editing the visible objects.

viewEditor: procedure name

The parameters of the procedure must be the following:

  • id (ID of the component required by the procedure)

  • position Current Item position

  • root Root View of the current item

  • viewType The type of view that corresponds to the item

Name
Type(s)
Def. value

with

-

viewEditor

Text

-

SetViewProvider

Sets the procedure in charge of creating each visible object.

viewCreator: procedure name

The parameters of the procedure must be the following:

  • id (ID of the component required by the procedure)

  • root Root View of the current item

  • viewType The type of view that corresponds to the item

Name
Type(s)
Def. value

with

-

viewCreator

Text

-

SetViewTypeProvider

Sets the procedure in charge of providing the visible object types.

viewTypeProvider: procedure name

The parameters of the procedure must be the following:

  • id (ID of the component required by the procedure)

  • position current item position

Name
Type(s)
Def. value

with

-

viewTypeProvider

Text

-

SmoothScrollTo

Performs a smooth animated scroll on the RecyclerView until the required position is reached.

Name
Type(s)
Def. value

with

-

position

Number

-

UpdateData

Updates the component data.

Name
Type(s)
Def. value

with

-

data

List

-

UseDiffUtil

Enables Diffutils API

Name
Type(s)
Def. value

with

-

use

Boolean

-

PreviousDocumentationNextProperty Blocks

Last updated 3 years ago

Return Type:

Return Type:

Return Type:

Current Scrolling state

It is recommended to use it only when the component is to be bound to a new list. On the other hand, if only the list was edited (items inserted or deleted), it is recommended to use

NotifyDataSetChanged
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
#with
state
Direction
Direction
spanCount
stackFromEnd
stackFromEnd
spanCount
LayoutManager
LayoutManager
LayoutManager
LayoutManager