StateLayoutConfig

data class StateLayoutConfig(@DrawableRes val loadingDrawable: Int? = null, @DrawableRes val errorDrawable: Int? = null, @StringRes val loadingMessage: Int? = null, @StringRes val defaultMessage: Int? = null, @StringRes val retryAction: Int? = null, @AnimRes val inAnimation: Int = android.R.anim.fade_in, @AnimRes val outAnimation: Int = android.R.anim.fade_out) : IStateLayoutConfig

Configurable state layout params to be consumed by co.anitrend.arch.ui.view.widget.SupportStateLayout

Since

v1.2.0

Parameters

loadingDrawable

drawable for loading state, set this to null if you wish to hide the element

errorDrawable

drawable for error state, set this to null if you wish to hide the element

loadingMessage

label for loading message, set this to null if you wish to hide the element

retryAction

label for retry action, set this to null if you wish to hide the element

inAnimation

optional animations to use for switching in views

outAnimation

optional animations to use for switching out views

Constructors

Link copied to clipboard
constructor(@DrawableRes loadingDrawable: Int? = null, @DrawableRes errorDrawable: Int? = null, @StringRes loadingMessage: Int? = null, @StringRes defaultMessage: Int? = null, @StringRes retryAction: Int? = null, @AnimRes inAnimation: Int = android.R.anim.fade_in, @AnimRes outAnimation: Int = android.R.anim.fade_out)

Properties

Link copied to clipboard
open override val defaultMessage: Int? = null

label for success state, set this to null if you wish to hide the element

Link copied to clipboard
open override val errorDrawable: Int? = null
Link copied to clipboard
open override val inAnimation: Int
Link copied to clipboard
open override val loadingDrawable: Int? = null
Link copied to clipboard
open override val loadingMessage: Int? = null
Link copied to clipboard
open override val outAnimation: Int
Link copied to clipboard
open override val retryAction: Int? = null