-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] Fix ListView Scrolled event not triggering #22661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22630.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| #if IOS | ||
| using NUnit.Framework; | ||
| using NUnit.Framework.Legacy; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue22630 : _IssuesUITest | ||
| { | ||
| public override string Issue => "ListView Scrolled event is not triggered"; | ||
|
|
||
| public Issue22630(TestDevice device) | ||
| : base(device) | ||
| { } | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.ListView)] | ||
| public void ListViewScrolled() | ||
| { | ||
| App.WaitForElement("TestListView"); | ||
| App.ScrollDown("TestListView", ScrollStrategy.Gesture, swipeSpeed: 1000); | ||
| var result = App.FindElement("TestLabel").GetText(); | ||
| ClassicAssert.AreEqual("Success", result); | ||
| } | ||
| } | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| <?xml version="1.0" encoding="utf-8" ?> | ||
| <ContentPage | ||
| xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
| x:Class="Maui.Controls.Sample.Issues.Issue22630"> | ||
| <Grid RowDefinitions="Auto, *"> | ||
| <Label | ||
| x:Name="TestLabel" | ||
| AutomationId="TestLabel" /> | ||
| <ListView | ||
| AutomationId="TestListView" | ||
| Grid.Row="1" | ||
| Scrolled="OnListViewScrolled"> | ||
| <ListView.ItemsSource> | ||
| <x:Array Type="{x:Type x:String}"> | ||
| <x:String>Item 1</x:String> | ||
| <x:String>Item 2</x:String> | ||
| <x:String>Item 3</x:String> | ||
| <x:String>Item 4</x:String> | ||
| <x:String>Item 5</x:String> | ||
| <x:String>Item 6</x:String> | ||
| <x:String>Item 7</x:String> | ||
| <x:String>Item 8</x:String> | ||
| <x:String>Item 9</x:String> | ||
| <x:String>Item 10</x:String> | ||
| <x:String>Item 11</x:String> | ||
| <x:String>Item 12</x:String> | ||
| <x:String>Item 13</x:String> | ||
| <x:String>Item 14</x:String> | ||
| <x:String>Item 15</x:String> | ||
| <x:String>Item 16</x:String> | ||
| <x:String>Item 17</x:String> | ||
| <x:String>Item 18</x:String> | ||
| <x:String>Item 19</x:String> | ||
| <x:String>Item 20</x:String> | ||
| <x:String>Item 21</x:String> | ||
| <x:String>Item 22</x:String> | ||
| <x:String>Item 23</x:String> | ||
| <x:String>Item 24</x:String> | ||
| <x:String>Item 25</x:String> | ||
| <x:String>Item 26</x:String> | ||
| <x:String>Item 27</x:String> | ||
| <x:String>Item 28</x:String> | ||
| <x:String>Item 29</x:String> | ||
| <x:String>Item 30</x:String> | ||
| </x:Array> | ||
| </ListView.ItemsSource> | ||
| </ListView> | ||
| </Grid> | ||
| </ContentPage> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| using Microsoft.Maui.Controls; | ||
|
|
||
| namespace Maui.Controls.Sample.Issues | ||
| { | ||
| [Issue(IssueTracker.None, 22630, "ListView Scrolled event is not triggered", PlatformAffected.iOS)] | ||
| public partial class Issue22630 : ContentPage | ||
| { | ||
| public Issue22630() | ||
| { | ||
| InitializeComponent(); | ||
| } | ||
|
|
||
| void OnListViewScrolled(System.Object sender, ScrolledEventArgs e) | ||
| { | ||
| TestLabel.Text = "Success"; | ||
| } | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes applied fixing #20025
Mistake in comparison.