SwipeProgress

@ExperimentalWearMaterialApi
class SwipeProgress<T : Any?>


Collects information about the ongoing swipe or animation in swipeable.

To access this information, use SwipeableState.progress.

Summary

Public constructors

<T : Any?> SwipeProgress(
    from: T,
    to: T,
    fraction: @FloatRange(from = 0.0, to = 1.0) Float
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

Float

The fraction that the current position represents between from and to.

T

The state corresponding to the anchor we are moving away from.

T

The state corresponding to the anchor we are moving towards.

Public constructors

SwipeProgress

<T : Any?> SwipeProgress(
    from: T,
    to: T,
    fraction: @FloatRange(from = 0.0, to = 1.0) Float
)
Parameters
from: T

The state corresponding to the anchor we are moving away from.

to: T

The state corresponding to the anchor we are moving towards.

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

The fraction that the current position represents between from and to. Must be between 0 and 1.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

fraction

Added in 1.0.0
val fractionFloat

The fraction that the current position represents between from and to. Must be between 0 and 1.

from

Added in 1.0.0
val from: T

The state corresponding to the anchor we are moving away from.

to

Added in 1.0.0
val to: T

The state corresponding to the anchor we are moving towards.