Halia is a LoadingDialog binder with RxJava
- Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
- Add the dependency
dependencies {
implementation 'cn.quickits:Halia:x.y.z'
}
class SampleApplication : Application() {
override fun onCreate() {
super.onCreate()
Halia.init(this)
}
}
API.loadingByNetwork()
.loading() // bind loading dialog
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({
Toast.makeText(this, it, Toast.LENGTH_SHORT.show()
}, {
it.printStackTrace()
})
Apache License Version 2.0
Copyright (c) 2019-present, Quickits.CN