概述
在设计应用的时候,我们应该çƒçˆ±ï¿½?简主义,简�?�就是好的,对于很多用户�?�说,�?�?�的东西并�?�?�欢迎。 我�?å®žçŽ°çš„æ˜¯æ ¹ï¿½?��?�?�的情况去显示�?�?ï¿½çš„åŠ è½½æ•ˆæžœï¼Œï¿½?用�?调,效果是借鉴于�?一项目的效果,我认为有必�?�??�?�出�?�改善�?装一下,供以�?ï¿½ä½¿ç”¨ã€‚æƒ…å†µå¤§è‡´åˆ†ä¸ºï¼šåŠ è½½ä¸ï¿½?æ— ç½‘ç»œï¿½?æ— æ•°ï¿½?��?åŠ è½½å¤±è´¥ç‰ï¼Œè¿™äº›ä»…仅就需�?一个View 就�?�以�?�定啦�?
效果图:
Usage
mLoadingView.withLoadEmptyText("≥�?≤ , 啥也木有 !")
.withEmptyIcon(R.drawable.disk_file_no_data)
.withBtnEmptyEnnable(false)
.withErrorIco(R.drawable.ic_chat_empty)
.withLoadErrorText("(῀( ˙᷄�?˙᷅ )῀)ᵒ�?�?ᵎᵎᵎ,我家程�?猿跑路了 !")
.withBtnErrorText("è‡ç‹—屎!!!")
.withLoadNoNetworkText("ä½ æŒ¡ï¿½?�信�?�啦o( ̄ヘ ̄o)☞ᗒᗒ ä½ èµ°")
.withNoNetIcon(R.drawable.ic_chat_empty)
.withBtnNoNetText("网弄好了,�?试")
.withLoadingIcon(R.drawable.loading_animation)
.withLoadingText("åŠ è½½ä¸...")
.withOnRetryListener(new XHLoadingView.OnRetryListener() {
@Override
public void onRetry() {
SnackbarUtil.show(mLoadingView,"已�?在努力�?试了",0);
}
}).build();
.....
if(mLoadState.contains(LOADING)){
mLoadingView.setVisibility(View.VISIBLE);
mLoadingView.setState(LoadingState.STATE_LOADING);
}else if(mLoadState.contains(LOADING_EMPTY)){
mLoadingView.setVisibility(View.VISIBLE);
mLoadingView.setState(LoadingState.STATE_EMPTY);
}else if(mLoadState.contains(LOADING_NONETWORK)){
mLoadingView.setVisibility(View.VISIBLE);
mLoadingView.setState(LoadingState.STATE_NO_NET);
}else if(mLoadState.contains(LOADING_ERROR)){
mLoadingView.setVisibility(View.VISIBLE);
mLoadingView.setState(LoadingState.STATE_ERROR);
}
apk:DownLoad
Blog:http://xuhaoblog.com/Android-custom-loadingview.html
License
Copyright 2016 Xuhao
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

