NetStateMgr

class NetStateMgr(val context: Context)

NetStateMgr used to manage the page of different states.

Currently mainly supports fellowing states: NetState.EMPTY_DATA, NetState.NET_ERROR, NetState.LOADING_ERROR, NetState.LOADING.

If you want to customize the page, you can use setEmptyDataView, setNetErrorView, setLoadingView, setLoadingView, otherwise the default page will be used.

Since

1.1.1

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
private val context: Context
Link copied to clipboard
internal lateinit var emptyDataVs: ViewStub
Link copied to clipboard
internal lateinit var loadingErrorVs: ViewStub
Link copied to clipboard
internal lateinit var loadingVs: ViewStub
Link copied to clipboard

It will be called when the layout state is NetState.EMPTY_DATA.

Link copied to clipboard

It will be called when the layout state is NetState.LOADING_ERROR.

Link copied to clipboard

It will be called when the layout state is NetState.LOADING.

Link copied to clipboard

It will be called when the layout state is NetState.NET_ERROR.

Link copied to clipboard
internal lateinit var netErrorVs: ViewStub

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

You can set the view click event including the following status:EMPTY DATA.

Link copied to clipboard

You can set the view click event including the following status:LOADING ERROR.

Link copied to clipboard

You can set the view click event including the following status:LOADING.

Link copied to clipboard

You can set the view click event including the following status:NET ERROR.