showLong

abstract fun showLong(coroutineScope: CoroutineScope, text: String): Deferred<Unit>

显示较长时间的 Toast 消息。

此方法会启动一个异步任务,在主线程中显示文本。

Return

Deferred 对象。该对象会在 Toast 显示请求被提交执行后完成(注意:并不代表 Toast 消息已消失)。

Parameters

coroutineScope

用于启动异步任务的协程作用域 CoroutineScope

text

要显示的文本内容。