Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.
/ StatusLayout Public archive

Android StatusLayout,多种状态布局,空布局,错误布局等等...

License

Notifications You must be signed in to change notification settings

7449/StatusLayout

Repository files navigation

StatusLayout

Android StatusLayout

StatusView

see demo:

StatusViewActivity

description

val statusView = StatusView(context)
statusView.addView(Status(Status.ERROR,statusView.createView(R.layout.status_view_layout)))
statusView.addView(Status(CUSTOM,statusView.createView(R.layout.status_view_layout)))
statusView.show(Status.ERROR) 
statusView.show(CUSTOM)

activity

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val statusView = Status.bind(this)
}

click

statusView.onClick(status) { view ->
}

currentView

statusView.currentView

screenshot

Gradle

implementation "com.ydevelop:status-layout:1.0.0"

attr

<resources>
    <declare-styleable name="StatusLayout">
        <attr name="status_error_layout" format="reference"/>
        <attr name="status_success_layout" format="reference"/>
        <attr name="status_empty_layout" format="reference"/>
        <attr name="status_loading_layout" format="reference"/>
        <attr name="status_normal_layout" format="reference"/>
        <attr name="status_current_status" format="string"/>
    </declare-styleable>
    <string name="status_error">StatusLayout:Error</string>
    <string name="status_empty">StatusLayout:Empty</string>
    <string name="status_loading">StatusLayout:Loading</string>
    <string name="status_success">StatusLayout:Success</string>
    <string name="status_normal">StatusLayout:Normal</string>
</resources>

About

Android StatusLayout,多种状态布局,空布局,错误布局等等...

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages