FastScrollConfiguration

class FastScrollConfiguration


Value class describing visual customization to the fast scrolling affordance. Namely, the page indicator and visual thumb background images and end margins can be customized.

Summary

Public companion functions

FastScrollConfiguration
withDrawableAndDimensionIds(
    fastScrollPageIndicatorBackgroundDrawableRes: @DrawableRes Int,
    fastScrollVerticalThumbDrawableRes: @DrawableRes Int,
    fastScrollPageIndicatorMarginEndRes: @DimenRes Int,
    fastScrollVerticalThumbMarginEndRes: @DimenRes Int
)

Instantiates a FastScrollConfiguration using Drawable resource IDs to describe the backgrounds for the page indicator and vertical thumb of the fast scroller, and using dimension resource IDs to describe the end margin applied to the same elements.

FastScrollConfiguration
withDrawableIdsAndDp(
    fastScrollPageIndicatorBackgroundDrawableRes: @DrawableRes Int,
    fastScrollVerticalThumbDrawableRes: @DrawableRes Int,
    fastScrollPageIndicatorMarginEnd: Dp,
    fastScrollVerticalThumbMarginEnd: Dp
)

Instantiates a FastScrollConfiguration using Drawable resource IDs to describe the backgrounds for the page indicator and vertical thumb of the fast scroller, and using Dp values to describe the end margin applied to the same elements.

Public companion functions

withDrawableAndDimensionIds

Added in 1.0.0-alpha10
fun withDrawableAndDimensionIds(
    fastScrollPageIndicatorBackgroundDrawableRes: @DrawableRes Int = R.drawable.page_indicator_background,
    fastScrollVerticalThumbDrawableRes: @DrawableRes Int = R.drawable.fast_scroll_thumb_drawable,
    fastScrollPageIndicatorMarginEndRes: @DimenRes Int = R.dimen.page_indicator_right_margin,
    fastScrollVerticalThumbMarginEndRes: @DimenRes Int = R.dimen.scroll_thumb_margin_end
): FastScrollConfiguration

Instantiates a FastScrollConfiguration using Drawable resource IDs to describe the backgrounds for the page indicator and vertical thumb of the fast scroller, and using dimension resource IDs to describe the end margin applied to the same elements.

withDrawableIdsAndDp

fun withDrawableIdsAndDp(
    fastScrollPageIndicatorBackgroundDrawableRes: @DrawableRes Int = R.drawable.page_indicator_background,
    fastScrollVerticalThumbDrawableRes: @DrawableRes Int = R.drawable.fast_scroll_thumb_drawable,
    fastScrollPageIndicatorMarginEnd: Dp = 42.dp,
    fastScrollVerticalThumbMarginEnd: Dp = 0.dp
): FastScrollConfiguration

Instantiates a FastScrollConfiguration using Drawable resource IDs to describe the backgrounds for the page indicator and vertical thumb of the fast scroller, and using Dp values to describe the end margin applied to the same elements.