library
/
com.secoo.coobox.library.util.lifecycle
/
HandlerGuard
Handler
Guard
object
HandlerGuard
Content copied to clipboard
处理Handler与生命周期载体的解绑关系
Functions
Functions
equals
Link copied to clipboard
open operator fun
equals
(other:
Any
?):
Boolean
Content copied to clipboard
hashCode
Link copied to clipboard
open fun
hashCode
():
Int
Content copied to clipboard
toString
Link copied to clipboard
open fun
toString
():
String
Content copied to clipboard
watch
Link copied to clipboard
fun
watch
(activity:
Activity
?, runnable:
Runnable
?, handler:
Handler
? = mainThreadHandler)
Content copied to clipboard
监控并处理handler的runnable 当activity销毁的时候,从handler中移除runnable待执行任务
fun
watch
(fragment:
Fragment
?, runnable:
Runnable
?, handler:
Handler
? = mainThreadHandler)
Content copied to clipboard
监控并处理 handler 的 runnable 当 Fragment 销毁的时候,从 handler 中移除 runnable 待执行任务