onVisibilityChanged

abstract fun onVisibilityChanged(model: T, view: V, percentVisibleHeight: Float, percentVisibleWidth: Float, @Px() heightVisible: Int, @Px() widthVisible: Int)

This will be called once the view visible part changes.

OnModelVisibilityChangedListener should be used with particular care since they will bedispatched on every frame while scrolling. No heavy work should be done inside theimplementation. Using OnModelVisibilityStateChangedListener is recommended wheneverpossible.

Parameters

model

The model being bound

view

The view that is being bound to the model

percentVisibleHeight

The percentage of height visible (0-100)

percentVisibleWidth

The percentage of width visible (0-100)

heightVisible

The visible height in pixel

widthVisible

The visible width in pixel