DialogCallback

abstract class DialogCallback<T>(activity: FragmentActivity, dialog: Dialog?, cancelable: Boolean) : NetCallback<T> , LifecycleObserver

会自动在网络请求开始显示加载对话框, 在网络请求时关闭对话框.

Constructors

DialogCallback
Link copied to clipboard
fun DialogCallback(activity: FragmentActivity, dialog: Dialog? = null, cancelable: Boolean = true)

Functions

dismiss
Link copied to clipboard
fun dismiss()
onComplete
Link copied to clipboard
open override fun onComplete(call: Call, e: Throwable?)
网络请求完成
onStart
Link copied to clipboard
open override fun onStart(request: Request)
网络请求开始

Properties

activity
Link copied to clipboard
val activity: FragmentActivity
加载对话框所在的Activity
cancelable
Link copied to clipboard
val cancelable: Boolean = true
加载对话框是否可以手动取消.
dialog
Link copied to clipboard
var dialog: Dialog? = null
单例加载对话框.