Equivalent of ListView.setEmptyView in RecyclerView

前端 未结 13 1668
孤街浪徒
孤街浪徒 2020-11-30 17:44

In RecyclerView, I want to set an empty view to be shown when the adapter is empty. Is there an equivalent of ListView.setEmptyView()?

13条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 18:04

    I think this is more complete with both ErrorView & EmptyView https://gist.github.com/henrytao-me/2f7f113fb5f2a59987e7

提交回复
热议问题