-
public final class EpoxyVisibilityItemThis class represent an item in a android.view.ViewGroup and it is being reused with multiple model via the update method. There is 1:1 relationship between an EpoxyVisibilityItem and a child within the android.view.ViewGroup.
It contains the logic to compute the visibility state of an item. It will also invoke the visibility callbacks on com.airbnb.epoxy.EpoxyViewHolder
This class should remain non-public and is intended to be used by EpoxyVisibilityTracker only.
-
-
Field Summary
Fields Modifier and Type Field Description private IntegeradapterPosition
-
Constructor Summary
Constructors Constructor Description EpoxyVisibilityItem(Integer adapterPosition)
-
Method Summary
Modifier and Type Method Description final IntegergetAdapterPosition()final UnitsetAdapterPosition(Integer adapterPosition)final Booleanupdate(View view, ViewGroup parent, Boolean detachEvent)Update the visibility item according the current layout. final Unitreset(Integer newAdapterPosition)final UnithandleVisible(EpoxyViewHolder epoxyHolder, Boolean detachEvent)final UnithandleFocus(EpoxyViewHolder epoxyHolder, Boolean detachEvent)final UnithandlePartialImpressionVisible(EpoxyViewHolder epoxyHolder, Boolean detachEvent, @IntRange(from = 0.toLong(), to = 100.toLong()) Integer thresholdPercentage)final UnithandleFullImpressionVisible(EpoxyViewHolder epoxyHolder, Boolean detachEvent)final BooleanhandleChanged(EpoxyViewHolder epoxyHolder, Boolean visibilityChangedEnabled)final UnitshiftBy(Integer offsetPosition)-
-
Constructor Detail
-
EpoxyVisibilityItem
EpoxyVisibilityItem(Integer adapterPosition)
-
-
Method Detail
-
getAdapterPosition
final Integer getAdapterPosition()
-
setAdapterPosition
final Unit setAdapterPosition(Integer adapterPosition)
-
update
final Boolean update(View view, ViewGroup parent, Boolean detachEvent)
Update the visibility item according the current layout.
- Parameters:
view- the current com.airbnb.epoxy.EpoxyViewHolder's itemViewparent- the android.view.ViewGroup
-
handleVisible
final Unit handleVisible(EpoxyViewHolder epoxyHolder, Boolean detachEvent)
-
handleFocus
final Unit handleFocus(EpoxyViewHolder epoxyHolder, Boolean detachEvent)
-
handlePartialImpressionVisible
final Unit handlePartialImpressionVisible(EpoxyViewHolder epoxyHolder, Boolean detachEvent, @IntRange(from = 0.toLong(), to = 100.toLong()) Integer thresholdPercentage)
-
handleFullImpressionVisible
final Unit handleFullImpressionVisible(EpoxyViewHolder epoxyHolder, Boolean detachEvent)
-
handleChanged
final Boolean handleChanged(EpoxyViewHolder epoxyHolder, Boolean visibilityChangedEnabled)
-
-
-
-