Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Samples/Samples.Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ namespace Samples.Droid
Categories = new[] { Intent.CategoryDefault })]
public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
static App formsApp;

protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
Expand All @@ -27,7 +29,7 @@ protected override void OnCreate(Bundle bundle)

Xamarin.Essentials.Platform.ActivityStateChanged += Platform_ActivityStateChanged;

LoadApplication(new App());
LoadApplication(formsApp ??= new App());
}

protected override void OnResume()
Expand Down
4 changes: 3 additions & 1 deletion Samples/Samples.Mac/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ namespace Samples.Mac
[Register(nameof(AppDelegate))]
public class AppDelegate : FormsApplicationDelegate
{
static App formsApp;

NSWindow window;

public AppDelegate()
Expand All @@ -32,7 +34,7 @@ public override void DidFinishLaunching(NSNotification notification)
{
Forms.Init();

LoadApplication(new App());
LoadApplication(formsApp ??= new App());

base.DidFinishLaunching(notification);
}
Expand Down
4 changes: 3 additions & 1 deletion Samples/Samples.Tizen/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ namespace Samples.Tizen
{
class Program : FormsApplication
{
static App formsApp;

protected override void OnCreate()
{
base.OnCreate();

LoadApplication(new App());
LoadApplication(formsApp ??= new App());
}

static void Main(string[] args)
Expand Down
4 changes: 3 additions & 1 deletion Samples/Samples.UWP/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ namespace Samples.UWP
{
public sealed partial class MainPage : Xamarin.Forms.Platform.UWP.WindowsPage
{
static Samples.App formsApp;

public MainPage()
{
InitializeComponent();

Platform.MapServiceToken = "RJHqIE53Onrqons5CNOx~FrDr3XhjDTyEXEjng-CRoA~Aj69MhNManYUKxo6QcwZ0wmXBtyva0zwuHB04rFYAPf7qqGJ5cHb03RCDw1jIW8l";

LoadApplication(new Samples.App());
LoadApplication(formsApp ??= new Samples.App());
}
}
}
4 changes: 3 additions & 1 deletion Samples/Samples.iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ namespace Samples.iOS
[Register(nameof(AppDelegate))]
public partial class AppDelegate : Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
static App formsApp;

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
Xamarin.Forms.Forms.Init();
Xamarin.Forms.FormsMaterial.Init();

Distribute.DontCheckForUpdatesInDebug();
LoadApplication(new App());
LoadApplication(formsApp ??= new App());

return base.FinishedLaunching(app, options);
}
Expand Down