classMyApplication : Application() {
overridefunonCreate() {
super.onCreate()
Aloading.Registry.apply {
/** * 注册自定义加载视图*/
register(MyLoadingView::class.java,MyLoadingViewFactory)
}
}
}/** * 装饰view*/
loadView =Aloading.default().wrap(this)
loadView.showLoading() // 显示加载中
loadView.showLoadFailed() // 显示加载失败
loadView.showLoadSuccess() // 显示加载成功

