V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
cundong
V2EX  ›  Android

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

  •  
  •   cundong · Nov 16, 2015 · 13116 views
    This topic created in 3827 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   ·   2567 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 00:26 · PVG 08:26 · LAX 17:26 · JFK 20:26
    ♥ Do have faith in what you're doing.