Giter VIP home page Giter VIP logo

placeholderview's Introduction

PlaceHolderView

  • 统一封装、管理LoadingView,EmptyView,ErrorView等等
  • 实现统一注册, 多处调用

usage

  1.注册 :
       new PlaceHolderView.Config()
               .addPlaceHolder(ErrorPlaceHolder.class, EmptyPlaceHolder.class, LoadingPlaceHolder.class)
               .install();

  2.在具体的View/Activity/fragment上绑定 :
       PlaceHolderView.getDefault().bind(View)

  3.通过PlaceHolderManager来控制Show/HidePlaceHolderManager.showPlaceHolder(EmptyPlaceHolder.class);
       et...

  4.可以在View/Activity/fragment生命周期结束时,释放
       PlaceHolderManager.release();

参考

LoadSir的一些不足之处(如果有误, 请及时反馈纠正) :

  • 线程使用不规范
  • 内存泄漏代码
  • PlaceHolderView.onDetach调用时机不准确
  • PlaceHolderLayout 移除需调用所有callback的detach, 执行释放操作

Listener

MIT License

placeholderview's People

Contributors

cxmax avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.