using ElmSharp;
using Tizen.Applications;
using TSystemInfo = Tizen.System.Information;
+using TSystemSetting = Tizen.System.SystemSettings;
using ELayout = ElmSharp.Layout;
using DeviceOrientation = Xamarin.Forms.Internals.DeviceOrientation;
using Xamarin.Forms.PlatformConfiguration.TizenSpecific;
var window = new PreloadedWindow();
Forms.Init();
+ var locale = TSystemSetting.LocaleLanguage;
+ TSystemSetting.LocaleLanguageChanged += (s, e) => { };
+
var types = new[]
{
typeof(Application),
{
base.OnPreCreate();
Application.ClearCurrent();
- var type = typeof(Window);
- // Use reflection to avoid breaking compatibility. ElmSharp.Window.CreateWindow() is has been added since API6.
- var methodInfo = type.GetMethod("CreateWindow", BindingFlags.NonPublic | BindingFlags.Static);
Window window = null;
- if (methodInfo != null)
+ window = PreloadedWindow.GetInstance() ?? new Window("FormsWindow");
+ if (window is PreloadedWindow precreated)
{
- window = (Window)methodInfo.Invoke(null, new object[] { "FormsWindow" });
- BaseLayout = (ELayout)window.GetType().GetProperty("BaseLayout")?.GetValue(window);
- }
- else
- {
- window = PreloadedWindow.GetInstance() ?? new Window("FormsWindow");
- if (window is PreloadedWindow precreated)
- {
- BaseLayout = precreated.BaseLayout;
- }
+ BaseLayout = precreated.BaseLayout;
}
+
MainWindow = window;
}