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

ListView not scrolling, not selecting after update, extremely slow to update #6943

Closed
hbraasch opened this issue May 9, 2022 · 8 comments · Fixed by #7485
Closed

ListView not scrolling, not selecting after update, extremely slow to update #6943

hbraasch opened this issue May 9, 2022 · 8 comments · Fixed by #7485
Assignees
Labels
area-controls-listview ListView and TableView fixed-in-6.0.400 Look for this fix in 6.0.400! high It doesn't work at all, crashes or has a big impact. p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@hbraasch
Copy link

hbraasch commented May 9, 2022

Description

Please see linked reproduction project and video.
On both Android and iOS, starting with a tabbed page with a listview on each page, the:

  1. ListViews do not scroll
  2. Initially, the ListViews allow one to select an item (turning orange), but once the list is updated, on Android, the selection does not happen anymore (I'm just adding one item to List1 for this demonstration).
  3. There are 400 items per list (which sounds like a lot), but I was expecting the component to handle it better. The display updates are extremely slow, demonstrated by changing between lists by selecting different tags.

The sample project can be found here:

https://github.com/hbraasch/TabbedListViewTester.git

The demonstration video can be found here:

https://github.com/hbraasch/TabbedListViewTester/blob/master/ListViewProblem.mp4

Steps to Reproduce

  1. Load and run the project using Visual Studio
  2. Switch between tabs to see how slow it reponds
  3. Try to scroll any list, it does not
  4. Change to List1 (Tab), select any item and notice it changes to [yellow]
  5. Press [Add] button. A new item will appear in the list at the top.
  6. Try to select any item in the list. It never changes to [yellow]

Version with bug

Release Candidate 2 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

Android 12 - API 30/31, iOS 15.4

Did you find any workaround?

None

Relevant log output

No response

@hbraasch hbraasch added s/needs-verification Indicates that this issue needs initial verification before further triage will happen t/bug Something isn't working labels May 9, 2022
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed and removed s/needs-verification Indicates that this issue needs initial verification before further triage will happen labels May 9, 2022
@XamlTest
Copy link

XamlTest commented May 9, 2022

Verified this issue with Visual Studio Enterprise 17.3.0 Preview 1.0 [32427.455.main]. Repro on Android with above project.

@KarlSearl
Copy link

Hi @hbraasch In the short term, whilst this gets looked in, I would personally suggest collection view, as it offers a very simple way to add Lazy loading (paging).

I am not sure what the long term plans are, seems harder to keep both ListView and collectionView (from a maintenance perspective). Good luck, hope it gets fixed.

@jsuarezruiz jsuarezruiz added area-controls-listview ListView and TableView high It doesn't work at all, crashes or has a big impact. labels May 9, 2022
@Redth Redth added this to the 6.0.300 milestone May 9, 2022
@Redth Redth added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label May 9, 2022
@hbraasch
Copy link
Author

hbraasch commented May 9, 2022

Hi @KarlSearl

Thanks for the suggestion. Much appreciated.

I've replaced one of my ListViews with a CollectionView and did see some improvement. But... it unfortunately still does not scroll on Android. Everthing using the CollectionView works fine on iOS.

So, for the developers please... There is ALSO a problem with CollectionView...
Here is the updated reproduction project:

https://github.com/hbraasch/TabbedListViewTester.git

And here is a short video to demonstrate the issue:

https://github.com/hbraasch/TabbedListViewTester/blob/master/CollectionViewProblem.mp4

Regards

@hbraasch
Copy link
Author

hbraasch commented May 10, 2022

I now notice its got to do with the layout, having the buttons and the listview inside a VerticalStackLayout.
If the tab page only contains the collectionview, scrolling starts to work.

@samhouts
Copy link
Member

Could be related to #6584

@samhouts samhouts modified the milestones: 6.0.300, 6.0.300-servicing May 12, 2022
@hbraasch
Copy link
Author

For what its worth, for the ListView issue, I've now noticed that when I replace the [ViewCell] with a [TextCell] in the DataTemplate section (I can do this in this case, because I only need to display a string), scrolling starts working again.
I followed this route as a temp solution because I saw in the logs it complains the [ViewCell] renderer is incompatible
[Microsoft.Maui.Platform.ToPlatformException: Microsoft.Maui.Controls.Handlers.Compatibility.ViewCellRenderer found for Microsoft.Maui.Controls.ViewCell is incompatible]

@Redth Redth modified the milestones: 6.0.300-servicing, 6.0.3xx-sr1 May 18, 2022
@PureWeen PureWeen self-assigned this May 25, 2022
@PureWeen
Copy link
Member

@hbraasch the problem on a few of your tabs is that you are using a Vertical Stack Layout which allows for infinite height. The ListView doesn't know what size to measure to so it can't constrain itself and be scrollable

image

Your other issues should be resolved by this PR
#7485

@hbraasch
Copy link
Author

Thanks

I'm now aware of the problem when having a ListView inside a StackLayout.

I'll wait for the next release to see if the other issues are resolved.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 26, 2022
@samhouts samhouts added the fixed-in-6.0.400 Look for this fix in 6.0.400! label Feb 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-listview ListView and TableView fixed-in-6.0.400 Look for this fix in 6.0.400! high It doesn't work at all, crashes or has a big impact. p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint platform/android 🤖 platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants