We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Issue with SfExpander when content is a bindable stacklayout - Android only

Hi,

I'm using SfExpander which contain 1 or more items that are displayed as part of a bindable StackLayout, roughly as per the below XAML. On iOS (iphone XS and iphone SE), performance is absolutely fine. But on Nexus 5x device or even Android emulator on i7 desktop, performance is bad and sometimes the content doesn't even display, it just stays blank.

<sfExpander:SfExpander.Content>
                    <StackLayout BindableLayout.ItemsSource="{Binding displayItems}" >
                        <BindableLayout.ItemTemplate>
                            <DataTemplate>
                                <Content which is a a 2x3 grid, with a few bound labels and a sfLinearGauge that spans the colums>


The debugger output displays countless rows of this:

6 15:12:55.691 W/View    (26264): requestLayout() improperly called by crc64d7687c9d419c3959.AppCompatAnimationNavRenderer{1fb6553 V.E...... ......ID 0,0-1080,1731 #75} during second layout pass: posting in next frame
02-06 15:12:55.691 W/View    (26264): requestLayout() improperly called by android.widget.TextView{f2deb81 V.EDHV... ......I. 850,0-928,167} during second layout pass: posting in next frame
02-06 15:12:55.701 W/View    (26264): requestLayout() improperly called by android.widget.TextView{f2deb81 V.EDHV... ......I. 850,0-928,167} during layout: running second layout pass

I have tried using compiled bindings to see if it helps, but unfortuantely it didn't.

Any idea why this is the case?

3 Replies

LN Lakshmi Natarajan Syncfusion Team February 7, 2020 03:57 AM UTC

Hi Mark, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Issue with Expander when content is Bindable StackLayout” from our end. We would like to let you know that we could not able to reproduce the reported issue from our end. We have checked the issue in Samsung S7 (Android 7 – API 24) device and Android 8.1 - API 27 emulator and Expander loaded as expected. We have attached the tested sample for your reference. Please find the sample in the following link, 
 
 
Meanwhile, we suggest you to use DynamicSizeMode property as Content for Expander which may resolve the reported issue. 
 
Please check the sample and let us know if you still facing the same issue? If not, please modify our sample to replicate the issue and revert us back with the following details which would be helpful for us to analyze further and provide you the solution as soon as possible. 
 
·        Share Expander Xaml page 
·        Syncfusion and Xamarin.Forms update version 
·        Device configuration details 
 
Regards, 
Lakshmi Natarajan 



MA Mark February 7, 2020 12:57 PM UTC

That unfortunately didn't help :(

I tried removing absolutely everything unessential from my layout down to just similar to your sample and it would still occasionally not expand the content. I also tried to "break" your sample, but also had no luck.

My page is quite complex, i don't know if it's worth sharing, but it could be contributing to the issue.

Interestingly, setting the animation time to 0 means that at least the content seems to always be shown, so i'll use this as a workaround. Those lines are still shown in the debug output.

For reference, SF version is 17.4.0.47 and XF version is 4.4.0.991640. AppCompact is V7 28.0.0.3.

I will follow this issue with XF in case it fixes the issue:
https://github.com/xamarin/Xamarin.Forms/issues/3168


LN Lakshmi Natarajan Syncfusion Team February 10, 2020 12:44 PM UTC

Hi Mark, 
 
Thank you for the update. 
 
We are glad that reported issue have been resolved at your end. We will also keep track of the Xamarin.Forms issue and update you the details. 
 
Regards, 
Lakshmi Natarajan 


Loader.
Live Chat Icon For mobile
Up arrow icon