Closed sakshi173 closed 2 years ago
@sakshi173 Hi! Do you mind to say what device did you use in your video or even to repeat the test please? I tried to reproduce the steps, using an iphone 7 and the speed was acceptable. The first item was presented as expected and didn`t flip automatically.
Pretty sure it's not about the speed but the fact that it automatically scrolls (flips) past the last item.
So ignore the comment about speed or needing to be faster, and le'ts make sure the control shows the proper item when loaded.
Right! However, even that problem didn`t happened with me. Everything is working fine.
Ok so move to the next one and will let @sakshi173 try to reproduce on latest Canary. Maybe it got fix by something else.
@francoistanguay and @iury-kc, Sure whenever I will receive the latest canary build for iOS, I will try to reproduce it and update the status accordingly.
@iury-kc, Today I retested this bug with latest iOS canary build and still getting the same issue(below is the video). Device -iPhone12, Software Version 14.1 and canaries build(Testflight) Version 1.5.0 (887), Release Date Mar 9, 2022
Hi @sakshi173 Thanks for your time! I have the Uno Gallery 1.4.1 at iPhone 7, Software Version 15.3.1. I'll try using the simulator, and the dev version of Uno Gallery so.
@iury-kc you'll need to build a version of the gallery using the latest master to get the issue.
Got it !! Thanks!
Running on the simulator, the last master i could see the first Item for a couple of seconds. Suddenly, the last item cames out.
It seams something is firing the scrow to last item.
I'll investigate the cause.
Running a simple APP with the last master commit, the problem is a little bit different, but occurs on Android and iPhone as well. XAML as simple as:
<FlipView x:Name="flipView" Height="600" SelectedIndex="0">
<FlipViewItem>
<Grid Background="#550000">
<StackPanel VerticalAlignment="Center">
<TextBlock Text="Item 1" Foreground="White" HorizontalAlignment="Center" />
<TextBlock Text="← Swipe" Foreground="White" HorizontalAlignment="Center" Margin="0,0,46,0" />
</StackPanel>
</Grid>
</FlipViewItem> // as many items as we want
Both Android and iOS doesn't show the FlipView. It only appears when we touch the region of the screen and do some drag. Then, the last item appears. As it is a recent behavior, since it doesn't happen on released version, I verified the last commits. At this line: https://github.com/unoplatform/uno/blob/edd03487b472643edc1989c18c87cc74ad81dbec/src/Uno.UI/UI/Xaml/Controls/Primitives/Selector.cs#L398
The value of selectedIndexToSet reaches the Items.Count value. As index is base 0, it will try to select an inexisting item.
Just for TESTING PURPOSES, forcing SelectedIndex backing to 0, when the behavior above occurs, the FlipView works fine. Obviously, the issue's root is not there.
As the above TestMethod is enough to test the behavior, i don't think it's necessary to create another one just for this issue. On the other hand, it's a little bit strange that the existing test was passed, since the SelectedIndex didn't start with 0.
I verified issue for iOS and issue is fixed closing.
Current behavior
https://user-images.githubusercontent.com/74563602/154142383-0175eb55-f306-4e73-9439-aa4ef062b9fa.MOV
Expected behavior
when Flipview first loaded control should shows the proper item.
https://user-images.githubusercontent.com/74563602/156660622-b44df00a-ee12-442c-a77f-3ce15948e32d.mp4
How to reproduce it (as minimally and precisely as possible)
Workaround
No response
Works on UWP/WinUI
No response
Environment
No response
NuGet package version(s)
No response
Affected platforms
iOS
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response