show different Android views by various status
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app Fix error in BottomNavigationView demo Nov 3, 2017
gradle/wrapper init projetc Oct 22, 2017
lib Fix the method of setting margin Jan 12, 2018
.gitignore Feat: fix some code Oct 23, 2017
LICENSE Update Jan 12, 2018
build.gradle Feat: fix some code Oct 23, 2017 init projetc Oct 22, 2017
gradlew init projetc Oct 22, 2017
gradlew.bat init projetc Oct 22, 2017


This is a library to help you show the different status of view such as loading , empty and error easily.


  • Support both in Activity and Fragment.
  • Support the custom view of different status.
  • Support the way to retry request by default button in error status.
  • Easily use.
  • With a delay loading by default avoid the too fast loading.
  • Support the Toolbar、NavigationBottomBar and etc.
  • Can use it with my forked SpringView gracefully.


Download Demo

  • It is the different status of Dialog, Error and Empty.


  • Use it with BaseStatusActivity or BaseStatusFragment :
public class LoadingActivity extends BaseStatusActivity {
  	// use it just by two line of code
  	// when you want to load something 
	// after loading finish 
 	// add a DefaultToolbar by default and you can setTitle or setCenterTitle for it.
  	setTitle("Loading in Activity");
  • Use it without BaseStatusActivity or BaseStatusFragment :
// init StatusView in Activity 
mStatusView = StatusView.initInActivity(this);
// setup btn click in Error View
mStatusView.setOnRetryBtnClickListener(new OnRetryBtnClickListener() {
	public void onClick(View view) {
  • Besides, you can set the code in your BaseActivity or BaseFragment by copying the code from BaseStatusActivity or BaseStatusFragment
// init StatusView with default ToolBar in BasseFragment
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
	super.onViewCreated(view, savedInstanceState);
	StatusManager statusManager = StatusManager
		// Should be this and not set getActivity in it.
		// Set your ContentView and it is usually the view that created in OnCreateView().
		// Set true to add a StatusView in your view and set false to avoid loading the unnecessary setting.
		// Set true to add a Toolbar and set false the setToolbar() will be invalid.
		// There will create a DefaultToolbar if you set null in it.

		mStatusView = statusManager.getStatusView();
		mToolbar = statusManager.getToolbar();

The code is so simple and you can set your custom attributes by using StatusManager.

More ways of usage can be found in my demo.


Step 1. Add the JitPack repository to your build file

allprojects {
   repositories {
      maven { url '' }

Step 2. Add the dependency

dependencies {
   compile 'com.github.wenqin-231:StatusView:v0.35'


The default empty view and error view are from dribbble.

BTW, I write a blog in Chinese about it.

At last , if you have an idea or others, you can contact with me by my Email : .

Hope you will like it.


Copyright (c) 2017 wenqin-231

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.