通用的空界面控件,支持顯示 loading、主標題和副標題、圖片。
用于顯示界面的 loading、錯誤信息提示等狀態(tài)。
?提供了一個 LoadingView、一行標題、一行說明文字、一個按鈕, 可以使用show(boolean, String, String, String, OnClickListener)系列方法控制這些控件的顯示內(nèi)容
使用:

顯示兩行提示語:

代碼:mEmptyView.show(getResources().getString(R.string.emptyView_mode_desc_double), getResources().getString(R.string.emptyView_mode_desc_detail_double));
源碼:

顯示一行提示語:

代碼:mEmptyView.show(getResources().getString(R.string.emptyView_mode_desc_single), null);
源碼:

顯示Loading:

代碼:mEmptyView.show(true);
源碼:

顯示一行文字和按鈕:

代碼:mEmptyView.show(false, getResources().getString(R.string.emptyView_mode_desc_fail_title), null, getResources().getString(R.string.emptyView_mode_desc_retry), null);
源碼:

顯示兩行文字和按鈕:

代碼:mEmptyView.show(false, getResources().getString(R.string.emptyView_mode_desc_fail_title), getResources().getString(R.string.emptyView_mode_desc_fail_desc), getResources().getString(R.string.emptyView_mode_desc_retry), null);
源碼:
