epoxy-adapter / com.airbnb.epoxy / VisibilityState

VisibilityState

class VisibilityState

Annotations

Visibility

class Visibility

Constructors

<init>

VisibilityState()

Properties

FOCUSED_VISIBLE

static val FOCUSED_VISIBLE: Int

Event triggered when a Component enters the Focused Range. This happens when either the Component occupies at least half of the viewport or, if the Component is smaller than half of the viewport, when the it is fully visible.

FULL_IMPRESSION_VISIBLE

static val FULL_IMPRESSION_VISIBLE: Int

Event triggered when a Component enters the Full Impression Range. This happens, for instance in the case of a vertical RecyclerView, when both the top and bottom edges of the component become visible.

INVISIBLE

static val INVISIBLE: Int

Event triggered when a Component becomes invisible. This is the same with exiting the Visible Range, the Focused Range and the Full Impression Range. All the code that needs to be executed when a component leaves any of these ranges should be written in the handler for this event.

PARTIAL_IMPRESSION_INVISIBLE

static val PARTIAL_IMPRESSION_INVISIBLE: Int

Event triggered when a Component exits the Partial Impression Range. This happens, for instance in the case of a vertical RecyclerView, when the percentage of the visible area is less than a specified threshold. The threshold can be set in EpoxyVisibilityTracker#setPartialImpressionThresholdPercentage(int).

PARTIAL_IMPRESSION_VISIBLE

static val PARTIAL_IMPRESSION_VISIBLE: Int

Event triggered when a Component enters the Partial Impression Range. This happens, for instance in the case of a vertical RecyclerView, when the percentage of the visible area is at least the specified threshold. The threshold can be set in EpoxyVisibilityTracker#setPartialImpressionThresholdPercentage(int).

UNFOCUSED_VISIBLE

static val UNFOCUSED_VISIBLE: Int

Event triggered when a Component exits the Focused Range. The Focused Range is defined as at least half of the viewport or, if the Component is smaller than half of the viewport, when the it is fully visible.

VISIBLE

static val VISIBLE: Int

Event triggered when a Component enters the Visible Range. This happens when at least a pixel of the Component is visible.