summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs')
-rw-r--r--Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs71
1 files changed, 71 insertions, 0 deletions
diff --git a/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs
new file mode 100644
index 00000000..d58c752b
--- /dev/null
+++ b/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla39331.cs
@@ -0,0 +1,71 @@
+´╗┐using System;
+
+using Xamarin.Forms.CustomAttributes;
+
+#if UITEST
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls
+{
+ [Preserve (AllMembers = true)]
+ [Issue (IssueTracker.Bugzilla, 39331, "[Android] BoxView Is InputTransparent Even When Set to False")]
+ public class Bugzilla39331 : TestContentPage
+ {
+ View _busyBackground;
+ Button _btnLogin;
+
+ protected override void Init ()
+ {
+ AbsoluteLayout layout = new AbsoluteLayout {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+ VerticalOptions = LayoutOptions.FillAndExpand,
+ };
+
+ BackgroundColor = Color.FromUint (0xFFDBDBDB);
+
+ _btnLogin = new Button {
+ HorizontalOptions = LayoutOptions.FillAndExpand,
+
+ Text = "Press me",
+ BackgroundColor = Color.FromUint (0xFF6E932D),
+ TextColor = Color.White,
+ };
+ _btnLogin.Clicked += BtnLogin_Clicked;
+ layout.Children.Add (_btnLogin, new Rectangle (0.5f, 0.5f, 0.25f, 0.25f), AbsoluteLayoutFlags.All);
+
+ _busyBackground = new BoxView {
+ BackgroundColor = new Color (0, 0, 0, 0.5f),
+ IsVisible = false,
+ InputTransparent = false
+ };
+ layout.Children.Add (_busyBackground, new Rectangle (0, 0, 1, 1), AbsoluteLayoutFlags.SizeProportional);
+
+ Content = layout;
+ }
+
+ void BtnLogin_Clicked (object sender, EventArgs e)
+ {
+
+ if (!_busyBackground.IsVisible) {
+ _btnLogin.Text = "Blocked?";
+ _busyBackground.IsVisible = true;
+ } else {
+ _btnLogin.Text = "Guess Not";
+ _busyBackground.IsVisible = false;
+ }
+ }
+
+#if UITEST
+ [Test]
+ public void Bugzilla34912Test ()
+ {
+ RunningApp.Tap (q => q.Marked ("Press me"));
+ RunningApp.WaitForElement (q => q.Marked ("Blocked?"));
+ RunningApp.Tap (q => q.Marked ("Blocked?"));
+ RunningApp.WaitForNoElement (q => q.Marked ("Guess Not"));
+ }
+#endif
+ }
+}