Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] [Android][UWP] CollectionView: empty view doesn't show if collection view contains a header #8326

Closed
bugaga6enika opened this issue Oct 31, 2019 · 5 comments · Fixed by #13247
Assignees
Labels
a/collectionview e/4 🕓 4 in-progress This issue has an associated pull request that may resolve it! p/Android p/UWP t/bug 🐛

Comments

@bugaga6enika
Copy link

Description

In case you have a header in a collection view and an empty items source the empty view doesn't show on Android. It gets more confusing depending on an items source: if the items source is an empty collection then header is visible (the rest of the screen is just a blank page). But if the items source is null then the header is not visible anymore but an empty view is displayed.

Expected Behavior

I assume that header should be visible with an empty view no matter if items source is null or an empty collection. As it does currently on iOS.

Basic Information

  • IDE: VS for Mac

  • Platform Target Frameworks:

    • iOS: 13.1
    • Android: 9
  • Nuget Packages: Xamarin.Forms 4.3.0.947036

Screenshots

iOS
image

Android

image

CollectionViewHeaderWithEmptyView.zip

@bugaga6enika bugaga6enika added s/unverified New report that has yet to be verified t/bug 🐛 labels Oct 31, 2019
@hartez hartez removed the s/unverified New report that has yet to be verified label Oct 31, 2019
@hartez hartez added the e/4 🕓 4 label Oct 31, 2019
@hartez
Copy link
Contributor

hartez commented Oct 31, 2019

I suspect this also happens with Footer.

@jsuarezruiz jsuarezruiz self-assigned this Oct 31, 2019
@bugaga6enika
Copy link
Author

@hartez Yes, same behaviour with the footer as well

@albertoha94
Copy link

I am also experiencing this issue in Android 10.
EmptyView is displayed ONLY after i removed Header and Footer, if i put any of those, the EmptyView disappears.
No header:
screenshot-1572804897661

Header added:
screenshot-1572806657073

@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Nov 22, 2019
@garyng
Copy link

garyng commented Dec 10, 2019

This is indeed a very confusing bug...

@samhouts
Copy link
Member

closed by #8415

rmarinho pushed a commit that referenced this issue Dec 31, 2020
…sly (#13247) fixes #8326 fixes #13252

* Restore ability to display header, footer, and empty view simultaneously
Now passes test from issue 8326

* Handle null emptyview/emptyviewtemplate

* Fix height check when deciding to update footer based on emptyview presence

* Fix EmptyView layout direction when CollectionView is RTL and items go to zero

* Add missing null checks in show and hide methods
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/collectionview e/4 🕓 4 in-progress This issue has an associated pull request that may resolve it! p/Android p/UWP t/bug 🐛
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants