summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues
diff options
context:
space:
mode:
authorSamantha Houts <samantha@teamredwall.com>2016-08-02 14:48:25 -0700
committerRui Marinho <me@ruimarinho.net>2016-08-02 22:48:25 +0100
commitd5ad18b3e9947157ab073eb0e5c0a30e7f039c62 (patch)
tree39534e2b17e7100285fa0cba43fcd6c8057d710b /Xamarin.Forms.Controls.Issues
parentfd838d3d800ce9eca3f70f2d89d0bf10a59d9f5e (diff)
downloadxamarin-forms-d5ad18b3e9947157ab073eb0e5c0a30e7f039c62.tar.gz
xamarin-forms-d5ad18b3e9947157ab073eb0e5c0a30e7f039c62.tar.bz2
xamarin-forms-d5ad18b3e9947157ab073eb0e5c0a30e7f039c62.zip
[A, iOS] ListView Pull-To-Refresh indicator animates when navigating back to it (#274)
* Add repro for 33561 * [A] ListView refreshing on created shows indicator * [iOS] Refresh indicator restarts when appeared * Remove superfluous get
Diffstat (limited to 'Xamarin.Forms.Controls.Issues')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33561.cs57
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 58 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33561.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33561.cs
new file mode 100644
index 00000000..ec55d370
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla33561.cs
@@ -0,0 +1,57 @@
+using System;
+
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 33561, "ListView Pull-to-Refresh ActivityIndicator animation stuck when navigating away and then back again")]
+ public class Bugzilla33561 : TestTabbedPage
+ {
+ public class ListPage : ContentPage
+ {
+ ListView _listView;
+ bool _isRefreshing;
+
+ public ListPage()
+ {
+ var template = new DataTemplate(typeof(TextCell));
+ template.SetBinding(TextCell.TextProperty, ".");
+
+ _listView = new ListView()
+ {
+ IsPullToRefreshEnabled = true,
+ ItemsSource = Enumerable.Range(0, 10).Select(no => $"FAIL {no}"),
+ ItemTemplate = template,
+ IsRefreshing = true
+ };
+
+ _listView.Refreshing += async (object sender, EventArgs e) =>
+ {
+ if (_isRefreshing)
+ return;
+
+ _isRefreshing = true;
+ await Task.Delay(10000);
+ _listView.EndRefresh();
+ _listView.ItemsSource = Enumerable.Range(0, 10).Select(no => $"SUCCESS {no}");
+ _isRefreshing = false;
+ };
+
+ Content = _listView;
+
+ Device.StartTimer(TimeSpan.FromSeconds(5), () => { _listView.IsRefreshing = false; return false; });
+ }
+ }
+
+ protected override void Init()
+ {
+ Children.Add(new NavigationPage(new ListPage()) { Title = "page 1" });
+ Children.Add(new ContentPage() { Title = "page 2" });
+ Children.Add(new ContentPage() { Title = "page 3" });
+ }
+ }
+}
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
index 1e3e9f34..67bfb32f 100644
--- a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems
@@ -169,6 +169,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla41842.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla42277.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ImageLoadingErrorHandling.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla33561.cs" />
<Compile Include="$(MSBuildThisFileDirectory)_Template.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue1028.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Issue1075.cs" />