public class StatusLoader
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
StatusLoader.Adapter
状态适配器
|
static class |
StatusLoader.Holder
|
| Modifier and Type | Field and Description |
|---|---|
static int |
STATUS_CUSTOM
自定义状态
|
static int |
STATUS_EMPTY_DATA
空数据状态
|
static int |
STATUS_LOAD_FAILED
加载失败状态
|
static int |
STATUS_LOAD_SUCCESS
加载成功状态
|
static int |
STATUS_LOADING
加载中状态
|
| Modifier and Type | Method and Description |
|---|---|
StatusLoader.Holder |
cover(android.view.View view)
loadingStatusView shows cover the view with the same LayoutParams object
this method is useful with RelativeLayout and ConstraintLayout
|
static StatusLoader |
from(StatusLoader.Adapter adapter)
Create a new StatusLoader different from the default one
|
static StatusLoader |
getDefault()
get default StatusLoader object for global usage in whole app
|
static void |
initDefault(StatusLoader.Adapter adapter)
init the default loading status view creator (
StatusLoader.Adapter) |
StatusLoader.Holder |
wrap(android.app.Activity activity)
StatusLoader(loading status view) wrap the whole activity
wrapper is android.R.id.content
|
StatusLoader.Holder |
wrap(android.view.View view)
StatusLoader(loading status view) wrap the specific view.
|
public static final int STATUS_LOADING
public static final int STATUS_LOAD_SUCCESS
public static final int STATUS_LOAD_FAILED
public static final int STATUS_EMPTY_DATA
public static final int STATUS_CUSTOM
public static StatusLoader from(StatusLoader.Adapter adapter)
adapter - another adapter different from the default onepublic static StatusLoader getDefault()
public static void initDefault(StatusLoader.Adapter adapter)
StatusLoader.Adapter)adapter - adapter to create all status viewspublic StatusLoader.Holder wrap(android.app.Activity activity)
activity - current activity objectpublic StatusLoader.Holder wrap(android.view.View view)
view - view to be wrappedpublic StatusLoader.Holder cover(android.view.View view)
view - the view which needs show loading status