cundong
V2EX  ›  Android

撸了一个给 RecyclerView 增加 Header、Footer,以及分页加载的库,欢迎拍砖

  •  
  •   cundong · Nov 16, 2015 · 13190 views
    This topic created in 3856 days ago, the information mentioned may be changed or developed.

    github : https://github.com/cundong/HeaderAndFooterRecyclerView

    HeaderAndFooterRecyclerView 是支持 addHeaderView 、 addFooterView 、分页加载的 RecyclerView 解决方案。

    它可以对 RecyclerView 控件进行拓展(通过 RecyclerView.Adapter 实现),给 RecyclerView 增加 HeaderView 、 FooterView ,并且不需要对你的具体业务逻辑 Adapter 做任何修改。

    同时,通过修改 FooterView State ,可以动态 FooterView 赋予不同状态(加载中、加载失败、滑到最底等),可以实现 RecyclerView 分页加载数据时的 Loading/TheEnd/NetWorkError 效果。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1033 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 18:12 · PVG 02:12 · LAX 11:12 · JFK 14:12
    ♥ Do have faith in what you're doing.