FadingEdges

constructor(widthDp: 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

widthDp

the width of the fade overlays (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(startWidthDp: Float = FADING_EDGE_WIDTH_DP, endWidthDp: Float = FADING_EDGE_WIDTH_DP, visibilityThresholdDp: Float = FADING_EDGE_VISIBILITY_THRESHOLD_DP, visibilityInterpolator: TimeInterpolator = AccelerateDecelerateInterpolator())

Parameters

startWidthDp

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

endWidthDp

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.