我有一个开放式的动画和正在使用Handler.postDelayed(Runnable接口,延迟)触发短暂的延迟后,关闭动画。然而,在之间打开和关闭的时间,有可能是另一个动画由点击触发的......我的问题是,我怎么会在处理程序中取消关闭动画?
I have an "open" animation and am using Handler.postDelayed(Runnable, delay) to trigger a "close" animation after a short delay. However, during the time between open and close, there is possibly another animation triggered by a click...my question is, how would I cancel the "close" animation in the handler?
感谢
只需使用removeCallbacks(Runnable R) 的方法。
Just use the removeCallbacks(Runnable r)
method.