Skip to content

Simple way to change your layout state, like loading, empty, error. Strong customizitaion, written by Kotlin.

Notifications You must be signed in to change notification settings

wangxp423/StateLayout

 
 

Repository files navigation

StateLayout

Simple way to change your layout state, like loading, empty, error. Strong customizitaion, written by Kotlin.

Feature

  • simple API to use
  • support Activity, Fragment, View
  • support custom state layout

ScreenShot

StateLayout

Usage

use in activity/fragment:

val stateLayout = StateLayout(this).wrap(this)

use for custom layout:

val layout2 = StateLayout(this).wrap(fl_custom)

custom default state layout:

StateLayout(this)
    .setLoadingRes(R.layout.custom_loading)
    .wrap(this)

change state api:

stateLayout.showLoading() //default state
stateLayout.showContent()
stateLayout.showError()
stateLayout.showEmpty()

Gradle

Download

compile 'com.lxj:statelayout:latest release'

About

Simple way to change your layout state, like loading, empty, error. Strong customizitaion, written by Kotlin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 100.0%