net / com.drake.net.scope / DialogCoroutineScope
DialogCoroutineScope¶
class DialogCoroutineScope :
NetCoroutineScope
, LifecycleObserver
自动加载对话框网络请求
开始: 显示对话框 错误: 提示错误信息, 关闭对话框 完全: 关闭对话框
Parameters¶
activity
- 对话框跟随生命周期的FragmentActivity
dialog
- 不使用默认的加载对话框而指定对话框
cancelable
- 是否允许用户取消对话框
Constructors¶
Name | Summary |
---|---|
<init> | 自动加载对话框网络请求DialogCoroutineScope(activity: FragmentActivity, dialog: Dialog ? = null, cancelable: Boolean = true, dispatcher: CoroutineDispatcher = Dispatchers.Main) |
Properties¶
Name | Summary |
---|---|
activity | 对话框跟随生命周期的FragmentActivityval activity: FragmentActivity |
cancelable | 是否允许用户取消对话框val cancelable: Boolean |
dialog | 不使用默认的加载对话框而指定对话框var dialog: Dialog ? |
Functions¶
Name | Summary |
---|---|
dismiss | fun dismiss(): Unit |
finally | fun finally(e: Throwable ?): Unit |
handleError | 错误处理fun handleError(e: Throwable ): Unit |
readCache | 读取缓存回调fun readCache(succeed: Boolean ): Unit |
start | fun start(): Unit |