Google is committed to advancing racial equity for Black communities. See how.

FractionalThreshold

@Immutable data class FractionalThreshold : ThresholdConfig
kotlin.Any
   ↳ androidx.compose.material.FractionalThreshold

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

Summary

Public constructors
<init>(@FloatRange(0.0, 1.0) fraction: Float)

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

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

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

Public constructors

<init>

FractionalThreshold(@FloatRange(0.0, 1.0) fraction: Float)

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

Parameters
fraction: Float The fraction (between 0 and 1) that the threshold will be at.

Public methods

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.