Hi,
There's some major problems with the SfListView under Android in the new Vol 4 (24.1.24) Release that just came out. (Note: iOS appears to be working fine - seems to just be an issue on Android).
For items that are initially off screen (ie. further down in the list beyond height of screen) - when scrolling down to those items, the rendering is all messed up. Child UI Elements are either in wrong positions or not being rendered at all.
For example :
In screenshot below (Android 13) - the last 2 x items have exact same Item Template as the others, but as you can see the child elements are in wrong positions and truncated.. These 2 x items are both off screen to start with and then when I scroll down in the List it looks like this. When I scroll back up and down occasionally it will either sort these items out or it mess up other items at start of list (this seems to be a bit random).
I have seen this all across our App which was working perfectly fine with last release of Vol 3. This happens both with and without grouping and also no matter what AutoFitMode is in use (both DynamicHeight and Height with size set). It also happens when Load More is in use too (and also when it isn't). So it doesn't appear to be any of these things causing it.
At a guess : From what I can tell, it would appear the items are potentially not being given the correct width by the pre-renderer (or maybe height as well). And then when items scroll into view they aren't getting refreshed with correct dimensions.
As per above, this is just happening with Android - iOS seems to actually be working quite well.
If you can please issue an urgent fix for this that would be appreciated - we are really needing to implement the new controls in Vol 4 (and have been waiting patiently) and having to revert back to Vol 3 would not be great.
thanks
Niall
Hi Naill,
We have reviewed the issue you reported and created a sample based on the provided information. The sample worked as expected during our testing with the Android 13 simulator. We have attached a video and code snippet for your reference.
Code Snippet
<syncfusion:SfListView x:Name="listView" ItemSpacing="10" ItemsSource="{Binding Items}"> <syncfusion:SfListView.ItemTemplate> <DataTemplate> <ViewCell> <Border> <Border.StrokeShape> <RoundRectangle CornerRadius="5" /> </Border.StrokeShape> <Grid ColumnDefinitions="*,50,50"> <Label Text="{Binding Name}" Grid.Column="0" /> <Border Grid.Column="1" Padding="10" Margin="10" HorizontalOptions="End" VerticalOptions="Center"> <Border.StrokeShape> <RoundRectangle CornerRadius="10" /> </Border.StrokeShape> <Image Source="download.png" HeightRequest="25" WidthRequest="25" /> </Border> <Border Stroke="Black" Padding="10" HorizontalOptions="End" Margin="10" VerticalOptions="Center" Grid.Column="2"> <Border.StrokeShape> <RoundRectangle CornerRadius="10" /> </Border.StrokeShape> <Image Source="images.png" HeightRequest="25" WidthRequest="25" /> </Border> </Grid> </Border> </ViewCell> </DataTemplate> </syncfusion:SfListView.ItemTemplate> </syncfusion:SfListView> |
To further investigate and address the query, could you please share the code snippet related to SfListView? This information will be valuable for us to conduct a more thorough validation.
Regards,
Riyas Hameed M
Hi Riyas,
I agree that your isolated sample with single page/only SfListView referenced is not reproducing this problem. However, that unfortunately does not solve the issue - we are definitely seeing it all across our existing App with Vol 4.
I am assuming it's a more complex set of preconditions which is triggering the problem.
Just to clarify again - the moment I revert our code back to Vol 3 (23.2.7) without changing anything else at all, then everything is working fine. When I change the project to reference Vol (24.1.24) then the problem exists again. So I'm definitely sure the Vol 4 release is the problem.
I would urge you to please keep trying to find what is causing this as only your team would understand what changed in the new release. It's causing major issues for us.
thanks
Niall
Hi,
Ok I did some modifications to the source code you provided which is now showing this problem occurring - please see attached .zip file.
These are the changes I made :
It's crude/messy - but it demonstrates how child UI Elements are randomly being not shown at all and how the layout is getting completely messed up.
Here is a screenshot of it with some annotations to show what I am seeing :
Note the following problems above (note that items with yellow square are every 5th item which has ShowExtra bool field enabled) :
Hi Niall,
We've investigated
the query you reported using the provided sample, and we were able to reproduce
the issue on our end. Our suspicion is that the problem might be stemming from
a lack of layout calls from the framework, resulting in improper updating of
the item height. We require additional time to thoroughly validate this
issue. we will provide you with the update on Dec 22,2023. We appreciate your patience until then.
Regards,
Riyas Hameed M
Hi Riyas,
Thanks for the update - good to hear that you are now able to reproduce it on your end as well which will help you investigate + solve this issue. Please keep me updated of progress - hopefully this can be sorted soon.
thanks
Niall
Hi Niall,
We have reanalyzed the reported query. During
scrolling, items will be reused, hence measuring the content(View Cell) with
same width and infinite Height returns previous measured size(measure call to
the descendent child might get skipped). To resolve this issue, we recommend
using a Grid instead of ViewCell or removing the ViewCell in ItemTemplate of
ListView. I hope this helps! Please feel free to ask if you have any further
questions or if there's anything else I can assist you with.
Code snippet
Regards,
Riyas Hameed M
Hi Riyas,
I just want to confirm that we do not use ViewCell in our App, we use Grid (and in some cases Border) - I only included it in the repro sample as that is what yours was based on. The problem still occurs without using ViewCell so this is not a solution unfortunately.
Note - I've also tried using the CachingStrategy property to CreateNewTemplate & while this is a bit more stable the performance takes a considerable hit and is unusable.
Again, I'd urge you to try to work out what your team changed between Vol 3 and Vol 4 for the Android implementation - it was working reasonably well in Vol 3 (slow performance but at least it did not have this major bug).
thanks
Niall
Hi Niall,
Sorry the inconvenience,
We have checked the all the code changes made in Vol 3 and Vol 4 releases and found that unfortunately some codes regarding to item-reusing case was removed in Vol 4 release. So, we planned to include those code changes in our upcoming weekly nuget on January 03,2023. In the meantime, we have prepared the custom nuget package with the required fixes. We kindly request you to use this custom nuget package as temporary solution until January 03, 2023.
Note : Please clear the nuget cache before installation.
Thank you for your understanding and cooperation.
Regards,
Suthi Yuvaraj
Hi Suthi,
Thanks for the update & that's great news to hear you have located & solved this problem.
I look forward to using the new version when it's available on January 3rd - until then unfortunately it's very complicated to patch in temporary releases not available via Nuget into our DevOps pipelines (which is what we need for testing Release iOS builds). I will however see if I can patch it in local dev environment prior to then on Android and see if it works at all.
thanks
Niall
Niall,
We glad to inform you that we have fixed the reported issue “Android SfListView Items doesnot render properly” and included the issue fix in our latest NuGet release update version 24.1.44 which is available for download (https://www.nuget.org/). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance.
Hi Suthi,
Just confirming the rendering issues seem to be fixed now in the 24.1.44 release - thanks for sorting that out.
However there are 2 x other issue with SfListView which are causing problems for us (mainly on iOS), I will post separate messages for these with more details :
Niall ,
We are glad that the reported issue has been resolved.Also Kindly check the separate forums you have created for the issue your facing in SfListView for further follow ups. Please let us know if you have any concerns.