PageCallback

abstract class PageCallback<T>(page: PageRefreshLayout) : NetCallback<T>

配合PageRefreshLayout布局使用 会在加载成功/错误时显示对应的缺省页 会在页面被销毁时自动取消网络请求

Constructors

PageCallback
Link copied to clipboard
fun PageCallback(page: PageRefreshLayout)

Functions

onComplete
Link copied to clipboard
open override fun onComplete(call: Call, e: Throwable?)
网络请求完成
onError
Link copied to clipboard
open override fun onError(call: Call, e: IOException)
网络请求完成
onFailure
Link copied to clipboard
open override fun onFailure(call: Call, e: IOException)
网络请求失败, 异步线程
onStart
Link copied to clipboard
open override fun onStart(request: Request)
网络请求开始

Properties

page
Link copied to clipboard
val page: PageRefreshLayout