FractionalThreshold


@ExperimentalWearMaterialApi
data class FractionalThreshold : ThresholdConfig


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

Summary

Public constructors

FractionalThreshold(fraction: @FloatRange(from = 0.0, to = 1.0) Float)

Public functions

open 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

FractionalThreshold

Added in 1.0.0
FractionalThreshold(fraction: @FloatRange(from = 0.0, to = 1.0) Float)
Parameters
fraction: @FloatRange(from = 0.0, to = 1.0) Float

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

Public functions

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

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