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

SfListView with AutoFitMode="Height" inside SfTabView

Hello,
I have nested a SfListView inside a SfTabItem as follow :
<tabView:SfTabItemTitle="Elements"SelectionColor="{StaticResourceThemeColor}"TitleFontColor="{StaticResourceThemeColor}">
<tabView:SfTabItem.Content>
<StackLayoutx:Name="ContributorItemContent">
<xForms:SfListViewx:Name="LvElements"
IsStickyHeader="True"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"
ItemSpacing="10"
AutoFitMode="Height"
SelectionMode="None"
IsEnabled="{BindingIsBusy,Converter={StaticResourceNegateBooleanConverter}}"
ItemsSource="{BindingElementsContribution}">
<xForms:SfListView.HeaderTemplate>
<DataTemplate>...
I m desperately trying to display a full ObservableCollection inside this ListView with this configuration on Android but without success. It's full of artifacts when I scroll and the last items are always cut off. I have tried to set the height of ListView to the height of the StackLayout "ContributorItemContent" but the result is the same.
If I withdraw all the tabView stuff, the SfListView shows as expected. 

9 Replies

PA Paul Anderson S Syncfusion Team October 3, 2018 12:30 PM UTC

Hi Jean, 
 
Greetings from Syncfusion. 
 
We have created a sample as per your code snippet having SfListView inside a SfTabView control and we are not able to reproduce the issue at our end. Please have the sample that we created for testing in the below link. 
 
 
We have to use the FillAndExpand option for the HorizontalOptions and VerticalOptions for having the full view rendered and is explained in the below link. 
 
 
Please let us know if it helps and if you still face any issues modify the sample to reproduce the issue so that we can analyse further and help you resolving it. 
 
Regards, 
Paul Anderson 



JH Jean Hardy October 3, 2018 04:07 PM UTC

Thanks for your answer. Based on your sample I tried to reproduce my case by adding my own features step by step. I realised that the custom bottom navbar that I use with Xamarin Forms 2.5.4 is causing the issue. 
This bottom navbar is a custom renderer available on Github (https://github.com/thrive-now/BottomNavigationBarXF).
Do you have any idea why it could mess up the listview when we set up a HeaderTemplate and the AutoFitMode="Height"? 

Regards,


PA Paul Anderson S Syncfusion Team October 4, 2018 12:43 PM UTC

Hi Jean, 
 
In SfTabview control, by setting TabHeaderPosition as bottom we can achieve the same requirement similar to custom bottom navbar. So can you please share the purpose of using custom bottom navbar in your project and are you using SfListview inside the SfTabview or Xamarin Forms TappedPage with custom bottom navbar?. Can you also please share a simple project or a screenshot of your application which will be helpful for better understanding. 
 
Regards, 
Paul Anderson 



JH Jean Hardy October 4, 2018 01:48 PM UTC

I have updated to Xamarin 3.2 and it's now working fine. I cannot use your custom bottom navbar because it does not derive from tabbedpage. In the architecture of my program every tabs at the bottom (the custom navbar) have their own navigation page.
I attached a picture so you can have a better understanding of what I am doing.
Regards,


PA Paul Anderson S Syncfusion Team October 5, 2018 12:07 PM UTC

Hi Jean, 
  
Thanks for the update. 
  
Based on your update we got that the issue faced with your application has been resolved. We could not find any image attached in your update. If you still face any issues let us know the details so that we will look into that and will help resolving that. 
  
Regards, 
Paul Anderson 



JH Jean Hardy October 5, 2018 12:14 PM UTC

Thank you for your time. Picture is now attached.

Attachment: Screenshot_20181004152421b_5368736f.rar


PA Paul Anderson S Syncfusion Team October 8, 2018 09:14 AM UTC

Hi Jean, 
  
Thanks for the update. 
  
We are now able to get your scenario. In your previous update it has been mentioned that the issue is resolved in latest Xamarin version. Can you please let us know if you still face any issue and the reported issue has been resolved or not. 
  
Regards, 
Paul Anderson 



JH Jean Hardy October 8, 2018 09:16 AM UTC

It is now working as expected after the Xamarin Forms update.


PA Paul Anderson S Syncfusion Team October 8, 2018 09:27 AM UTC

Hi Jean, 
  
Thanks for the update. We are glad that your reported issue has been resolved. Please get in touch if you require any further assistance in future. 
  
Regards, 
Paul Anderson 


Loader.
Live Chat Icon For mobile
Up arrow icon