NetStateLayout

class NetStateLayout @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : FrameLayout

NetStateLayout is a layout to set network state page.

You can use showLoadingshowLoadingErrorshowNetErrorshowEmptyData to show the net state page.

If you don't set the mNetStateMgr , it will take the default value when you call a method like showLoading .

Since

1.1.1

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Properties

Link copied to clipboard

Layout sparse array.

Link copied to clipboard

Set default vastNetStateMgr.

Functions

Link copied to clipboard
private fun addNetStateView()

Add all different state layouts to the frame layout

Link copied to clipboard
private fun checkVs(netState: NetState): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private fun showHideViewById(netState: NetState)

Show or hide view according to the netState .

Link copied to clipboard
Link copied to clipboard
fun showLoadingError(code: Int? = null, message: String? = null)
Link copied to clipboard
fun showNetError(throwable: Throwable? = null)
Link copied to clipboard