Closed xuzhu19930323 closed 1 week ago
使用库的版本号为:1.1.0-alpha-21@aar
当数据只有2条时,footer没有更多出不来,当数据达到6条时没有更多才展示出来
示例代码: refresh_layout.apply { setRefreshHeader(BinanceRefreshHeader(requireActivity())) setRefreshFooter(LocalRefreshFooter(requireActivity()).apply { setDefaultText() }) setOnRefreshListener { refreshData(true) } setOnLoadMoreListener { refreshData(false) } setEnableLoadMoreWhenContentNotFull(false) setEnableFooterFollowWhenNoMoreData(true) autoRefresh() }
private fun stopLoadingAndRefresh() { refresh_layout.let { it.finishRefresh() if (adapter.list.size < page * adapter.pageSize) { it.finishLoadMoreWithNoMoreData() } else { it.finishLoadMore() } } }
参考 demo 中的 示例: 首页-使用-NoMoreData
使用库的版本号为:1.1.0-alpha-21@aar
当数据只有2条时,footer没有更多出不来,当数据达到6条时没有更多才展示出来
示例代码: refresh_layout.apply { setRefreshHeader(BinanceRefreshHeader(requireActivity())) setRefreshFooter(LocalRefreshFooter(requireActivity()).apply { setDefaultText() }) setOnRefreshListener { refreshData(true) } setOnLoadMoreListener { refreshData(false) } setEnableLoadMoreWhenContentNotFull(false) setEnableFooterFollowWhenNoMoreData(true) autoRefresh() }
private fun stopLoadingAndRefresh() { refresh_layout.let { it.finishRefresh() if (adapter.list.size < page * adapter.pageSize) { it.finishLoadMoreWithNoMoreData() } else { it.finishLoadMore() } } }