Skip to content

iamdennisme/Halia

 
 

Repository files navigation

Halia

Halia is a LoadingDialog binder with RxJava

Download

  • 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'
}

Usage

Init

class SampleApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        Halia.init(this)
    }
}

Bind loading dialog with RxJava

API.loadingByNetwork()
    .loading() // bind loading dialog
    .subscribeOn(Schedulers.io())
    .observeOn(AndroidSchedulers.mainThread())
    .subscribe({
        Toast.makeText(this, it, Toast.LENGTH_SHORT.show()
    }, {
        it.printStackTrace()
    })

Licence

Apache License Version 2.0

Copyright (c) 2019-present, Quickits.CN

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 88.4%
  • Java 11.6%