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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfListView inside SfTabView not displaying all items

Thread ID:

Created:

Updated:

Platform:

Replies:

142137 Jan 21,2019 11:36 PM UTC Jan 24,2019 11:54 AM UTC Xamarin.Forms 5
loading
Tags: SfListView
Tomáš Oplatek
Asked On January 21, 2019 11:36 PM UTC

Hi,

I have an issue with SfListView inside SfTabView. When there are other items on the content page above the tabView, the list it is displaying will not be scrollable all the way down.

I have found a sample provided by you that should be dealing with a similar issue. I have modified it so that it shows the problem I am experiencing. Basically, I have just added a few labels above the tabView, and now the list does not scroll all the way down. I have tested it in multiple emulators with different versions and resolutions (for example Nexus 5X Api 27). In a higher resolution more items are displayed but, for example, the sample does still not scroll all the way.

You can download my sample project from GitHub repository.

Is this the expected behaviour? In my real project, I am using the top third of the screen to display additional information and buttons, which I would like to follow with the tab view.

Thank you for your help.

Jayaleshwari N [Syncfusion]
Replied On January 22, 2019 09:56 AM UTC

Hi Thomas,  
 
Thanks for contacting Syncfusion Support. 
 
We have checked the reported query “SfListView inside SfTabView not displaying all items while scrolling” from our side. We would like to know that touch didn’t pass to listview item when loaded inside tabview in Android was the issue logged in Tabview control( for version 16.3.0.21) and we have already fixed the reported issue.  
 
We have attached the tested sample which is working fine with latest nuget for your reference and you can download the same from the following location. 
 
Please let us know if you would require further assistance.  
 
Regards,  
Jayaleshwari N  


Tomáš Oplatek
Replied On January 22, 2019 06:51 PM UTC

Hi,

I have downloaded the updated sample, but the issue is still there, this is as far as I can scroll:


The last name should be Josena but I see Lissa. The emulator is Nexus 4 with API 23. It might be specific to some devices/resolutions because in my project the problem does not arise on every device, but with this sample, it happens on every emulator I have tried so far.


Subburaj Pandian Veluchamy [Syncfusion]
Replied On January 23, 2019 09:09 AM UTC

Hi Tomas,  
 
Thank you for the update. 
  
We have checked the reported Scrolling issue with the given sample from our side, we would like to know that in the sample TabView is loaded below many labels in stack layout without any defined size for tabview. So, the ListView items loaded inside the tabview was hidden below the StackLayout. This same issue will occur in Xamarin listview as well. It can be resolved by defining the HeightRequest property for the SfTabview or SfListView to load the items completely in view. We have set HeightRequest property for TabView and modified the sample based on that. Please find the modified sample by the following link.  
  
  
We hope that this helps you, kindly revert us if doesn’t meets your requirement. 
  
Regards,
Subburaj Pandian V  


Tomáš Oplatek
Replied On January 23, 2019 09:26 PM UTC

Hi,

Thank you for your help, I have been able to solve my issue by using HeightRequest and MinimumHeightRequest.

I have one more question, I am trying to implement a solution that would show the position of the item in listview. In this sample, I would like for the names to have a number in front of the names that indicates their position. I have been trying to solve this by using BindingContextChanged and it works, but when I re-order the items by dragging down it does not work properly. Is there an easier way of doing this, maybe some "position" binding that I am missing? Any help would be greatly appreciated.

Thank you.

Jayaleshwari N [Syncfusion]
Replied On January 24, 2019 11:54 AM UTC

Hi Tomas,  
  
Thanks for contacting Syncfusion Support. 
  
We have checked your query to update item position from our side. We would like to know that you can update listview item with position while dragging by updating the ItemPosition with Itemsize of SfListView for each item after dropping with the help of drag item’s position in ItemDraggingEvent. 
  
namespace TabView  
{  
   public class Behavior :Behavior<SfListView>  
    {  
        SfListView ListView;  
        ViewModel ViewModel;  
        protected override void OnAttachedTo(SfListView listView)  
        {  
            ListView = listView;  
            ViewModel = new ViewModel();  
            ViewModel = listView.BindingContext as ViewModel;  
            ListView.ItemDragging += ListView_ItemDragging;  
            ListView.DataSource.LiveDataUpdateMode = Syncfusion.DataSource.LiveDataUpdateMode.AllowDataShaping;  
            base.OnAttachedTo(listView);  
        }  
  
        private async void ListView_ItemDragging(object sender, ItemDraggingEventArgs e)  
        {  
            if (e.Action == DragAction.Drop)  
            {  
                if (e.OldIndex < e.NewIndex)  
                {  
                    await Task.Delay(100);  
                    ChangeData(e);  
                }  
            }  
        }  
  
        private void ChangeData(ItemDraggingEventArgs e)  
        {  
            ViewModel.ToDoList.MoveTo(e.OldIndex, e.NewIndex);  
  
            var position = e.Position.Y;  
            var itemSize = 0;  
            for (int i = 0; i < ViewModel.ToDoList.Count; i++)  
            {  
                (ViewModel.ToDoList[i] as ToDoItem).OrderPosition = position + itemSize;  
                itemSize += 60;  
            }  
        }  
  
    }  
}  
   
We have attached the sample for your reference and you can download the same from the following location. 
 
Please let us know, if this solution meets your requirement. 
  
Regards,  
Jayaleshwari N 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;