Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle empty view with AdapterDataObserver #489

Open
phatnhse opened this issue May 23, 2018 · 0 comments
Open

Handle empty view with AdapterDataObserver #489

phatnhse opened this issue May 23, 2018 · 0 comments

Comments

@phatnhse
Copy link

phatnhse commented May 23, 2018

Hi team, please take a look at this function

If I set empty adapter at the first time view created

  1. updateHelperDisplays will be called
  2. isFirstLoadingOnlineAdapter will become true, and there is nowhere to set it false again
  3. if mEmptyView is not null and data size = 0, then mEmpty will be gone?

Correct me if I am wrong: Lately when I call notifyDataSetChanged(), the function above (in red square) will never call again, so there is no change for mEmpty be visible again?

Expected: When data change, the empty view should be visible/gone base on data size. I don't want to use show/hide empty view explicitly, it will be painful to control states. Because UltimateRecyclerView already has AdapterDataObserver so I expect it could update UI base on data size.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant