-
public interface OnModelVisibilityChangedListener<T extends EpoxyModel<V>, V>Used to register an onVisibilityChanged callback with a generated model.
-
-
Method Summary
Modifier and Type Method Description abstract voidonVisibilityChanged(T model, V view, @FloatRange(from = 0, to = 100) float percentVisibleHeight, @FloatRange(from = 0, to = 100) float percentVisibleWidth, @Px() int heightVisible, @Px() int widthVisible)This will be called once the view visible part changes. -
-
Method Detail
-
onVisibilityChanged
abstract void onVisibilityChanged(T model, V view, @FloatRange(from = 0, to = 100) float percentVisibleHeight, @FloatRange(from = 0, to = 100) float percentVisibleWidth, @Px() int heightVisible, @Px() int widthVisible)
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 boundview- The view that is being bound to the modelpercentVisibleHeight- The percentage of height visible (0-100)percentVisibleWidth- The percentage of width visible (0-100)heightVisible- The visible height in pixelwidthVisible- The visible width in pixel
-
-
-
-