EpoxyVisibilityItem

class EpoxyVisibilityItem(adapterPosition: Int?)

This 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.

Constructors

EpoxyVisibilityItem
Link copied to clipboard
fun EpoxyVisibilityItem(adapterPosition: Int? = null)

Functions

handleChanged
Link copied to clipboard
fun handleChanged(epoxyHolder: EpoxyViewHolder, visibilityChangedEnabled: Boolean): Boolean
handleFocus
Link copied to clipboard
fun handleFocus(epoxyHolder: EpoxyViewHolder, detachEvent: Boolean)
handleFullImpressionVisible
Link copied to clipboard
fun handleFullImpressionVisible(epoxyHolder: EpoxyViewHolder, detachEvent: Boolean)
handlePartialImpressionVisible
Link copied to clipboard
fun handlePartialImpressionVisible(epoxyHolder: EpoxyViewHolder, detachEvent: Boolean, thresholdPercentage: Int)
handleVisible
Link copied to clipboard
fun handleVisible(epoxyHolder: EpoxyViewHolder, detachEvent: Boolean)
reset
Link copied to clipboard
fun reset(newAdapterPosition: Int)
shiftBy
Link copied to clipboard
fun shiftBy(offsetPosition: Int)
update
Link copied to clipboard
fun update(view: View, parent: ViewGroup, detachEvent: Boolean): Boolean
Update the visibility item according the current layout.

Properties

adapterPosition
Link copied to clipboard
var adapterPosition: Int