ThresholdConfig

@ExperimentalWearMaterialApi
interface ThresholdConfig

Known direct subclasses
FixedThreshold

A fixed threshold will be at an offset away from the first anchor.

FractionalThreshold

A fractional threshold will be at a fraction of the way between the two anchors.


Interface to compute a threshold between two anchors/states in a swipeable.

To define a ThresholdConfig, consider using FixedThreshold and FractionalThreshold.

Summary

Public functions

Float
Density.computeThreshold(fromValue: Float, toValue: Float)

Compute the value of the threshold (in pixels), once the values of the anchors are known.

Public functions

computeThreshold

fun Density.computeThreshold(fromValue: Float, toValue: Float): Float

Compute the value of the threshold (in pixels), once the values of the anchors are known.