Package com.secoo.coobox.library.ktx.android.os

Functions

delayRun
Link copied to clipboard
fun delayRun(runnable: Runnable?, delayInMills: Long)
延迟执行 runnable,默认使用主线程Handler
fun delayRun(runnable: Runnable?, delayInMills: Long, hostActivity: Activity?)
延迟执行 runnable,默认使用主线程Handler,当hostActivity销毁时,自动清理该任务
fun delayRun(runnable: Runnable?, delayInMills: Long, hostFragment: Fragment?)
延迟执行 runnable,默认使用主线程Handler,当hostFragment销毁时,自动清理该任务
isMainThreadHandler
Link copied to clipboard
fun Handler?.isMainThreadHandler(): Boolean
检测当前 Handler 是否为主线程 Handler
kvBundleOf
Link copied to clipboard
inline fun kvBundleOf(key: String?, value: Any?): Bundle
使用Key/Value 创建一个Bundle
plus
Link copied to clipboard
fun Bundle.plus(key: String?, value: Any?): Bundle
为现有的Bundle实例追加key,value
toDescription
Link copied to clipboard
fun Handler?.toDescription(): String

Properties

mainThreadHandler
Link copied to clipboard
val mainThreadHandler: Handler
主线程Looper,提供给业务,避免多次创建