summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.ControlGallery.Android/Activity1.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.ControlGallery.Android/Activity1.cs')
-rw-r--r--Xamarin.Forms.ControlGallery.Android/Activity1.cs24
1 files changed, 23 insertions, 1 deletions
diff --git a/Xamarin.Forms.ControlGallery.Android/Activity1.cs b/Xamarin.Forms.ControlGallery.Android/Activity1.cs
index ad3945ee..cfd8350f 100644
--- a/Xamarin.Forms.ControlGallery.Android/Activity1.cs
+++ b/Xamarin.Forms.ControlGallery.Android/Activity1.cs
@@ -21,7 +21,8 @@ using System.IO.IsolatedStorage;
using Droid = Android;
using System.Globalization;
-
+using Java.Interop;
+using Xamarin.Forms.Controls.Issues;
[assembly: Dependency (typeof (CacheService))]
[assembly: Dependency (typeof (TestCloudService))]
@@ -274,6 +275,12 @@ namespace Xamarin.Forms.ControlGallery.Android
{
base.OnDestroy();
}
+
+ [Export("NavigateToTest")]
+ public bool NavigateToTest(string test)
+ {
+ return _app.NavigateToTestPage(test);
+ }
}
#else
@@ -297,6 +304,8 @@ namespace Xamarin.Forms.ControlGallery.Android
]
public class Activity1 : FormsAppCompatActivity
{
+ App _app;
+
protected override void OnCreate (Bundle bundle)
{
ToolbarResource = Resource.Layout.Toolbar;
@@ -319,6 +328,7 @@ namespace Xamarin.Forms.ControlGallery.Android
//Forms.SetTitleBarVisibility (AndroidTitleBarVisibility.Never);
var app = new App();
+ _app = app;
// When the native control gallery loads up, it'll let us know so we can add the nested native controls
MessagingCenter.Subscribe<NestedNativeControlGalleryPage>(this, NestedNativeControlGalleryPage.ReadyForNativeControlsMessage, AddNativeControls);
@@ -446,6 +456,18 @@ namespace Xamarin.Forms.ControlGallery.Android
return null;
}
}
+
+ [Export("NavigateToTest")]
+ public bool NavigateToTest(string test)
+ {
+ return _app.NavigateToTestPage(test);
+ }
+
+ [Export("Reset")]
+ public void Reset()
+ {
+ _app.Reset();
+ }
}
#endif
}