static fun <Arg : Any!, Ret : Any!> onUiThread(function: Function<Arg, Ret>!): Function<Arg, Ret>!
Wrap the Function
so that its callbacks are executed on the UI thread.
function
- Function<Arg, Ret>!: the function to wrap
Return
Function<Arg, Ret>!: a Function
executed on the UI thread
static fun <Arg : Any!> onUiThread(consumer: Consumer<Arg>!): Consumer<Arg>!
Wrap the Consumer
so that its callbacks are executed on the UI thread.
consumer
- Consumer<Arg>!: the function to wrap
Return
Consumer<Arg>!: a Function
executed on the UI thread
static fun onUiThread(listener: QiDisconnectionListener!): QiDisconnectionListener!
Wrap the QiDisconnectionListener
so that its callbacks are executed on the UI thread.
listener
- QiDisconnectionListener!: the listener to wrap
Return
QiDisconnectionListener!: a QiDisconnectionListener
executed on the UI thread
static fun <T : Any!> onUiThread(interf: Class<T>!, callback: Any!): T
Wrap the interface implementation so that its callbacks are executed on the UI thread.
interf
- Class<T>!: the interface to implement
callback
- Any!: the callback to wrap
Return
T: an instance of the interface that will call the callback on the UI thread