Skip to content

stfnt/Aloading

Repository files navigation

ALoading

1.一行代码为你的view增加可以显示加载中,加载完成,加载失败等视图

2.支持自定义加载视图,多个加载视图风格可以同时运行

使用:

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

演示:

Aaron Swartz

Aaron Swartz

Aaron Swartz

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages