public class Gloading
extends java.lang.Object
Gloading.Adapter
)限定符和类型 | 类和说明 |
---|---|
static interface |
Gloading.Adapter
Provides view to show current loading status
|
static class |
Gloading.Holder
|
限定符和类型 | 字段和说明 |
---|---|
static int |
STATUS_EMPTY_DATA |
static int |
STATUS_LOAD_FAILED |
static int |
STATUS_LOAD_SUCCESS |
static int |
STATUS_LOADING |
限定符和类型 | 方法和说明 |
---|---|
Gloading.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 void |
debug(boolean debug)
set debug mode or not
|
static Gloading |
from(Gloading.Adapter adapter)
Create a new Gloading different from the default one
|
static Gloading |
getDefault()
get default Gloading object for global usage in whole app
|
static void |
initDefault(Gloading.Adapter adapter)
init the default loading status view creator (
Gloading.Adapter ) |
Gloading.Holder |
wrap(android.app.Activity activity)
Gloading(loading status view) wrap the whole activity
wrapper is android.R.id.content
|
Gloading.Holder |
wrap(android.view.View view)
Gloading(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 void debug(boolean debug)
debug
- true:debug mode, false:not debug modepublic static Gloading from(Gloading.Adapter adapter)
adapter
- another adapter different from the default onepublic static Gloading getDefault()
public static void initDefault(Gloading.Adapter adapter)
Gloading.Adapter
)adapter
- adapter to create all status viewspublic Gloading.Holder wrap(android.app.Activity activity)
activity
- current activity objectpublic Gloading.Holder wrap(android.view.View view)
view
- view to be wrappedpublic Gloading.Holder cover(android.view.View view)
view
- the view which needs show loading status