Hello,
I encounter an issue when I try to embed a SfRotator in a RefreshView.
For doing this, I've used your
UI Kit project and the
ArticleListPage page: I've only added a
RefreshView before the main
ScrollView:
<ContentPage.Content>
<RefreshView x:DataType="viewModel:ArticleListViewModel"
IsRefreshing="{Binding IsRefreshing}"
Command="{Binding RefreshCommand}">
<ScrollView>
<StackLayout Padding="16" Spacing="16">
In the ViewModel, I've added a new Refresh() method that is related to the RefreshCommand:
private void Refresh()
{
IsRefreshing = true;
Task.Delay(500);
GetData();
IsRefreshing = false;
}
In the ViewModel, I've also added a new GetData() method that is used by the Refresh() method and by the VM constructor to recover the data:
public void GetData()
{
this.FeaturedStories = new ObservableCollection<Model>
{
new Model
{
ImagePath = App.BaseImageUrl + "ArticleImage2.png",
Name = "Learning to Reset",
Author = "John Doe",
Date = "Aug 2010",
AverageReadingTime = "5 mins read"
},
...
}
this.LatestStories = new ObservableCollection<Model>
{
new Model
{
ImagePath = App.BaseImageUrl + "Article_image1.png",
Name = "Learning to Reset",
Author = "John Doe",
Date = "Apr 16",
AverageReadingTime = "5 mins read"
},
...
}
}
The behaviour seems to be fine on Android, but I encounter a strange issue on iOS:
- if the pull to refresh is done through a scroll started on the LatestStories list, there is no problem
- if the pull to refresh is done through a scroll started on the FeaturedStories list, the SfRotator is no longer visible until an horizontal scroll is done on the SfRotator
We can see this in the related GIF:
Is there a way to fix this?
Attachment:
ArticleListChanges_4f6e2735.zip