TiltGesture.State


public final class TiltGesture.State


Represents the tilt state of the device, transition progress.

Summary

Public constructors

State(@NonNull Tilt tilt, @FloatRange(from = 0.0, to = 1.0) float progress)

Public methods

boolean
equals(Object other)
final float

A value from 0.0 to 1.0 indicating the progress of the current transition.

final @NonNull Tilt

The current tilt state (Tilt.UP or Tilt.DOWN).

int
@NonNull String

Public constructors

State

Added in 1.0.0-alpha10
public State(@NonNull Tilt tilt, @FloatRange(from = 0.0, to = 1.0) float progress)
Parameters
@NonNull Tilt tilt

The current tilt state (Tilt.UP or Tilt.DOWN).

@FloatRange(from = 0.0, to = 1.0) float progress

A value from 0.0 to 1.0 indicating the progress of the current transition. It is 0.0 if no transition is in progress. This is useful for driving animations.

Public methods

equals

public boolean equals(Object other)

getProgress

Added in 1.0.0-alpha10
public final float getProgress()

A value from 0.0 to 1.0 indicating the progress of the current transition. It is 0.0 if no transition is in progress. This is useful for driving animations.

getTilt

Added in 1.0.0-alpha10
public final @NonNull Tilt getTilt()

The current tilt state (Tilt.UP or Tilt.DOWN).

hashCode

public int hashCode()

toString

public @NonNull String toString()