Slider.GracePeriod

  • A Slider.GracePeriod is a slider that animates and then dismisses after a set grace period or when cancelled.

  • It animates from left to right for a specified duration (timeInMs).

  • A Listener can be used to receive callbacks related to the grace period.

  • The grace period can be cancelled using the cancel() method.

Added in API level XE22

A slider that animates from left to right during the given grace period in timeInMs and then dismisses itself after running the appropriate callback. Remains visible until grace period runs out or is cancelled.

Sample usage:

 GracePeriod slider = Slider.from(view).startGracePeriod(listener);
    // animates for timeInMs milliseconds and then dismisses itself,
    // unless slider.cancel() is called in the meanwhile
 

Nested Classes
interface Slider.GracePeriod.Listener Listener call-backs. 
Public Methods
abstract void
cancel()

Public Methods

Added in API level XE22

public abstract void cancel ()

Cancels grace period. If called during the grace period, dismisses the grace period. Does nothing if grace period already completed normally.