FadingEdges

constructor(edgeWidthDp: Float = FADING_EDGE_WIDTH_DP, visibilityThresholdDp: Float = FADING_EDGE_VISIBILITY_THRESHOLD_DP, visibilityInterpolator: TimeInterpolator = AccelerateDecelerateInterpolator())

Creates a FadingEdges instance with fading edges of equal width.

Parameters

edgeWidthDp

the width of the fade overlay (in dp).

visibilityThresholdDp

the scroll distance over which the overlays fade in and out (in dp).

visibilityInterpolator

used for the fading edges’ fade-in and fade-out animations. This is a mapping of the degree to which visibilityThresholdDp has been satisfied to the opacity of the fading edges.


constructor(startEdgeWidthDp: Float = FADING_EDGE_WIDTH_DP, endEdgeWidthDp: Float = startEdgeWidthDp, visibilityThresholdDp: Float = FADING_EDGE_VISIBILITY_THRESHOLD_DP, visibilityInterpolator: TimeInterpolator = AccelerateDecelerateInterpolator())

Parameters

startEdgeWidthDp

the width of the fade overlay for the start edge (in dp).

endEdgeWidthDp

the width of the fade overlay for the end edge (in dp).

visibilityThresholdDp

the scroll distance over which the overlays fade in and out (in dp).

visibilityInterpolator

used for the fading edges’ fade-in and fade-out animations. This is a mapping of the degree to which visibilityThresholdDp has been satisfied to the opacity of the fading edges.