summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared
diff options
context:
space:
mode:
authorJimmy Garrido <jimmygarrido@outlook.com>2016-11-16 00:21:55 -0800
committerStephane Delcroix <stephane@delcroix.org>2016-11-16 09:21:55 +0100
commit46104e9ce186bb06567755f979414e0cbc426db6 (patch)
tree8e029151b04c9ca9427a328c13bcd3c91f61cf83 /Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared
parentffab780c2acd9ef49268d731e14b11b5fdbc3293 (diff)
downloadxamarin-forms-46104e9ce186bb06567755f979414e0cbc426db6.tar.gz
xamarin-forms-46104e9ce186bb06567755f979414e0cbc426db6.tar.bz2
xamarin-forms-46104e9ce186bb06567755f979414e0cbc426db6.zip
[iOS] Fix AccessoryView covered by section index list (#493)
* [iOS] Fix AccessoryView below section index list * Add UITest
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36802.cs79
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Xamarin.Forms.Controls.Issues.Shared.projitems1
2 files changed, 80 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36802.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36802.cs
new file mode 100644
index 00000000..59a64752
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla36802.cs
@@ -0,0 +1,79 @@
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+using System.Linq;
+using System.Collections.ObjectModel;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Bugzilla, 36802, "[iOS] AccessoryView Partially Hidden When Using RecycleElement and GroupShortName", PlatformAffected.iOS)]
+ public class Bugzilla36802 : TestContentPage
+ {
+ const string Instructions = "On iOS, all the list items below should have an AccessoryView visible. If any are not visible or are covered by the section index list then this test has failed.";
+ ObservableCollection<GroupedItem> grouped { get; set; }
+ ListView lstView;
+
+ public class AccessoryViewCell : ViewCell
+ {
+ public AccessoryViewCell()
+ {
+ var label = new Label();
+ label.SetBinding(Label.TextProperty, ".");
+ View = label;
+ }
+ }
+
+ public class GroupedItem : ObservableCollection<string>
+ {
+ public string LongName { get; set; }
+ public string ShortName { get; set; }
+ }
+
+ protected override void Init()
+ {
+ var label = new Label { Text = Instructions };
+ grouped = new ObservableCollection<GroupedItem>();
+ lstView = new ListView(ListViewCachingStrategy.RecycleElement) {
+ IsGroupingEnabled = true,
+ ItemTemplate = new DataTemplate(typeof(AccessoryViewCell)),
+ ItemsSource = grouped,
+ GroupDisplayBinding = new Binding("LongName"),
+ GroupShortNameBinding = new Binding("ShortName")
+ };
+
+ var grp1 = new GroupedItem() { LongName = "Group 1", ShortName = "1" };
+ var grp2 = new GroupedItem() { LongName = "Group 2", ShortName = "2" };
+
+ for (int i = 1; i < 4; i++)
+ {
+ grp1.Add($"Item #{i}");
+ grp2.Add($"Item #{i}");
+ }
+
+ grouped.Add(grp1);
+ grouped.Add(grp2);
+
+ Content = new StackLayout
+ {
+ Children = {
+ label,
+ lstView
+ }
+ };
+ }
+
+#if (UITEST && __IOS__)
+ [Test]
+ public void Bugzilla36802Test()
+ {
+ RunningApp.Screenshot("AccessoryView partially hidden test");
+ }
+#endif
+ }
+}
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 dc1e6040..d887d5c3 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
@@ -457,6 +457,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla41029.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla39908.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla39489.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Bugzilla36802.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Bugzilla22229.xaml">