-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Collection View Header and Empty View not showing on Android when ItemSource is null #8934
Comments
ETA on the fix? |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
I'm pretty sure the header is the problem in your case. |
My application needs to have things in a header (if using a collection view) because stacking content and a collection view results in incorrect scroll height. |
cc @davidortinau @jfversluis @PureWeen . This is a basic requirement thats failing us now. Can you please assign resources in this issue please? I know you guys are working hard and really appreciate the work :) Thank you! |
This is the general workaround I came up with until the bug is fixed
|
CarouselView has the same issue: Empty view doesn't work on Android whether the source collection is null or empty. |
To confirm for CollectionView: an empty ObservableCollection does not show the empty view on Android for me. |
Greate a Grid Control and bind to a boolean property. ‘https://github.com/dotnet/maui/issues/8934’
Verified this on Visual Studio Enterprise 17.7.0 Preview 1.0. Repro on Android 13.0 with below Project: Android: CollectionView.Header and CollectionView.EmptyView is not visible. Windows: CollectionView.Header is not visible, CollectionView.EmptyView is visible. |
The empty view only shows up in collectionview if it is set to a string., Facing same issue on Windows too. |
#11763 Fixes part of this issue; with that fix applied, the EmptyView will show up as long as there is no header or footer specified. If a header and/or footer are specified, grouping is not enabled, and the items source does not implement INotifyCollectionChanged, then an empty/null ItemsSource will cause the EmptyView, the Header, and the Footer to disappear. Working on a PR for that right now. |
…msSource is null Fixes #8934
Description
If the data the CollectionView is bound to is null, then CollectionView.Header and CollectionView.Empty View is not visible. This issue was also tested on the Windows version and the bug does not appear.
A sample of the issue can be found here https://github.com/3steve3/EmptyCollectionViewBug
Steps to Reproduce
Version with bug
6.0.400
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
No
Relevant log output
No response
The text was updated successfully, but these errors were encountered: