The Wayback Machine - https://web.archive.org/web/20201109105744/https://github.com/git-xuhao/XHLoadingView
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
apk
 
 
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

概述

在设计应用的时候,我们应该热爱�?简主义,简�?�就是好的,对于很多用户�?�说,�?�?�的东西并�?�?�欢迎。 我�?实现的是根�?��?�?�的情况去显示�?�?�的加载效果,�?用�?调,效果是借鉴于�?一项目的效果,我认为有必�?�??�?�出�?�改善�?装一下,供以�?�使用。情况大致分为:加载中�?无网络�?无数�?��?加载失败等,这些仅仅就需�?一个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.

About

🚀A load Loading page state view,load,no network,empty data,load failure state switch.

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.