-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Issue6614.cs
55 lines (50 loc) · 1.21 KB
/
Issue6614.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using Xamarin.Forms.Core.UITests;
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 6614, "[Android] Tabindex Calculation crashing when calculating on Layout", PlatformAffected.Android)]
public class Issue6614 : TestContentPage
{
Button _button = null;
string _instruction1 = "Turn on Screen Reader and click me.";
protected override void Init()
{
_button = new Button()
{
Text = _instruction1,
Command = new Command(() =>
{
if(Content is ContentView currentContentView)
{
var currentContent = currentContentView.Content;
currentContentView.Content = null;
this.Content = currentContent;
_button.Text = "Success";
}
else
{
var currentContent = this.Content;
var contentView = new ContentView();
this.Content = contentView;
contentView.Content = currentContent;
_button.Text = "Click me one more time";
}
}),
TabIndex = 1
};
Content = new StackLayout()
{
Children =
{
_button
}
};
}
}
}