Hello,
When we use SfAccordion we have this problem (only on Android, not on iOS)
[View] requestLayout() improperly called by android.widget.TextView{a907c6b V.ED..... ......ID 984,0-1066,82} during layout: running second layout pass
[View] requestLayout() improperly called by crc64bed5c1b20a8faf76.AccordionRenderer{eb92ca7 V.E...... ......ID 0,0-1080,82} during layout: running second layout pass
Do you have an idea how to correct it?
P.S. we use the version 20.3.0.52 of expander
Thank you for your help :)
Hi François,
We have checked the reported query “SfAccordion requestLayout() improperly called” , we have created a sample with provided code snippet , we are unable to reproduce the reported scenario at our end . We have attached a sample for your reference. Please have a look at the sample and let us know if we missed any customization you have done in your application, if possible, please revert to us with modified sample to replicate the reported scenario on our end. It will be more helpful for us to provide a timely solution.
Meanwhile , We have faced the reported scenario where we use the
Expander inside the resuable control (eg: ListView), we have suggested to use
the custom HeaderIcon to overcome the reported scenario.
Please refer to the following
documentation to use custom icons in Expander from the following links,
KB links:
Regards,
Suthi Yuvaraj.
I am experiencing this issue as well. I also have a fairly complex screen, but it seems to occur on all of them i have the accordion on. One thing i have noticed is mine seems to always be proceeded by a [ScrollView] onsize change event. Example from logs below (small sample, it shows the message repeated for every control, and then after i navigate for a while it will get stuck in a loop and starting showing th emessage non-stop). I removed all of the content from my accordion so there were no ScrollViews, and still received the message. My assumption is the SFAccordion utilizes a ScrollView and if the content is large enough to cause its size to change, this is when the messages occur (and seem to occur for every element in the sfAccordion).
[ScrollView] onsize change changed
[View] requestLayout() improperly called by crc643f46942d9dd1fff9.ContainerView{2875636 V.E...... ......ID 229,0-1080,179} during layout: running second layout pass
[View] requestLayout() improperly called by crc643f46942d9dd1fff9.Platform_DefaultRenderer{3a85937 V.E...... ......ID 0,0-851,179} during layout: running second layout pass
[View] requestLayout() improperly called by android.widget.TextView{97c9e23 V.ED..... ......ID 701,0-796,239} during layout: running second layout pass
[View] requestLayout() improperly called by crc64bed5c1b20a8faf76.AccordionRenderer{d5a80d1 V.E...... ......ID 0,16-810,1950} during layout: running second layout pass
[View] requestLayout() improperly called by crc643f46942d9dd1fff9.Platform_DefaultRenderer{251e6a V.E...... ......ID 0,0-810,1950} during layout: running second layout pass
[View] requestLayout() improperly called by crc643f46942d9dd1fff9.Platform_DefaultRenderer{c8b2e3f V.E...... ......ID 268,-22-1078,1928} during layout: running second layout pass
[View] requestLayout() improperly called by crc64ee486da937c010f4.LabelAppCompatRenderer{b46f60e V.ED..... ......ID 0,0-673,180 #51} during layout: running second layout pass
[View] requestLayout() improperly called by crc643f46942d9dd1fff9.Platform_DefaultRenderer{e765110 V.E...... ......ID 230,0-903,179} during layout: running second layout pass
[View] requestLayout() improperly called by crc643f46942d9dd1fff9.Platform_DefaultRenderer{b34ad11 V.E...... ......ID 902,0-1081,179} during layout: running second layout pass
Hi Joshua,
We have checked the reported query “requestLayout() improperly called exception on SfAccordion” , we have created a sample with SfAccordion and with scrollable content inside the SfAccordion, we are unable to reproduce the reported scenario at our end . We have attached a sample for your reference. Please have a look at the sample and let us know if we missed any customization you have done in your application, if possible, please revert to us with modified sample and share the below details to replicate the reported scenario on our end. It will be more helpful for us to provide a timely solution.
Meanwhile , We have faced the reported scenario where we use the Expander inside the resuable control (eg: ListView), we have suggested to use the custom HeaderIcon to overcome the reported scenario.
Please refer to the following documentation to use custom icons in Expander from the following links,
KB links:
Regards,
Suthi Yuvaraj.
I cannot get your sample to throw the error. But on my own code, at least in the main place I have been looking, I have narrowed it down to the accordion being inside a stack layout. Technically it is in a Grid, in a RefreshView in a StackLayout. If i remove each component the errors seem to stop when I remove the stack panel. Or, it at least reduces the number of times I see the error.
It seems it is not simply it being in the stack panel that is the issue, but rather the amount of space the accordion is taking up in the StackPanel, and the amount of resizing the stack panel does, that affects it.
I am still working on simplifying my app enough to narrow it down, but wanted to provide an update so you knew i received your response and am working on it.
Joshua,
We have checked the reported query from our side. On further analysis, we could reproduce the reported issue in the framework level itself and we have logged the issue report to Xamarin team for the same,
Bug report: https://github.com/xamarin/XamarinCommunityToolkit/issues/573
Kindly refer to the above bug report for further updates.
Meanwhile, this issue occurs due to the animation on expanding the Accordion content. As of now, we suggest you to use the SfAccordion without animation. Please find the following code snippets to overcome the issue,
Code snippet:
|
<syncfusion:SfAccordion ExpandMode="Multiple" AnimationDuration="0" AnimationEasing="None"> <syncfusion:SfAccordion.Items>
<syncfusion:AccordionItem> <syncfusion:AccordionItem.Header> <Grid Padding="10,0,0,10"> <Label TextColor="#495F6E" Text="Invoice Date" HeightRequest="50" VerticalTextAlignment="Center"/> </Grid> </syncfusion:AccordionItem.Header>
<syncfusion:AccordionItem.Content> <Grid Padding="10,0,0,10" BackgroundColor="#FFFFFF"> <Label TextColor="#303030" Text="11.03 AM, 15 January 2019" HeightRequest="50" VerticalTextAlignment="Center"/> </Grid> </syncfusion:AccordionItem.Content> </syncfusion:AccordionItem> </syncfusion:SfAccordion> |
Please let us know if you need further assistance.
Thank you for the response. I had ran across other people that had used the AnimationDuration="0" and AnimationEasing="None", so I had already set that. And i do believe that alleviated some of the messages, but not all of them.
I am sure it has something to do with the complexity of our design. But, we also were experiencing severe slowness when loading the accordion and often times the full UI would not load. I do not know if this was a direct result of the requestLayout() improperly called message, or some other underlying issue.
Ultimately we were spending too much time on it and had to revert to using a toolkit:Expander (despite losing some functionality this way), until we have time to circle back and figure out what was wrong with the accordion. When we do circle back, if I learn anything new that will help anyone who stumbles across this thread I will return and update it.
Joshua,
Sorry for the inconvenience caused. We are trying to reproduce the issue at our end, could you please share the details regarding the issue that resolved after using the workaround and the details regarding the issue that you are still facing, which would be more helpful for us to find the solution and improve the feasibility of the control.