Interface

ThresholdConfig

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

Source set: Android
public interface ThresholdConfig

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

To define a ThresholdConfig, consider using FixedThreshold and FractionalThreshold.

Functions

computeThreshold

Source set: Android
public fun Density.computeThreshold(fromValue: Float, toValue: Float): Float

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

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: