-
Notifications
You must be signed in to change notification settings - Fork 34
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
EmptyView overlaps with GlobalHeader, GlobalFooter and Content instead of going between GlobalHeader and GlobalFooter #31
Comments
The global headers/footers are implemented as items in the list, however the empty view spans the entire area of the collection view. Without totally changing how global header/footer is implemented (and that has some question of preference too - do you want it to scroll/bounce with the content? or be fixed above/below the content always?), it's going to be very difficult to make the empty view fill the available area between the global header/footer as a list item. I think the best path here is to simply have the global header/footer hidden when the adapter is empty, and if you want to continue to display some content like this, you can add it to the empty view template instead. You could even add the identical global header/footer content to the empty view template if you really want them to be the same (eg: use a grid with |
As described in #31 when the adapter is empty, the global header/footer (which are displayed in cells) overlap the empty view. While the desired behaviour in some cases might be to make the emptyview fill the remaining space that the global header/footer do not occupy, the problem is the header/footer are implemented as cells in the list (so they scroll with the content of the list - if you didn't want them to scroll, you'd put them outside of the list anyway), so it would be challenging to make the empty view a cell which fills the remaining space. This change instead hides the global header/footer if the adapter is empty, so that the empty view fills the entire space. If you really want the same global header/footer to appear when the adapter is empty, you can simply add them also to your empty view template (eg: use a grid with `RowDefinitions="Auto,*Auto"` where your header and footer are rows 0 and 2 and the middle view fills the remaining space.
Currently the EmptyView overlaps with the GlobalHeader, GlobalFooter and Content.
On iOS it goes under the content.
On Android it goes over the content.
I have not been able to test this issue on Windows or Mac yet.
I believe the expected result should be that the EmptyView goes between the GlobalHeader and GlobalFooter when there are no items.
Repro link: https://github.com/eth-ellis/Issue-Repro/tree/main/VirtualListEmptyViewOverlap
Examples
iOS
Android
The text was updated successfully, but these errors were encountered: