滑块.宽限期

在 API 级别 XE22 中引入

一个滑块,在给定的宽限期(以 timeInMs 为单位)内从左到右以动画形式呈现,然后在运行相应的回调后自行关闭。 在宽限期结束或取消之前会一直显示。

用法示例:

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

嵌套类
接口 Slider.GracePeriod.Listener 监听器回调。
公共方法
抽象 void
cancel()

公共方法

在 API 级别 XE22 中添加

public abstract void cancel ()

取消宽限期。如果在宽限期内调用,系统会关闭宽限期。如果宽限期已正常完成,不执行任何操作。