Move show code in Preload to OnPreCreate (#216)
author윤정현/Common Platform Lab(SR)/Staff Engineer/삼성전자 <jh0506.yun@samsung.com>
Wed, 29 Apr 2020 06:10:47 +0000 (15:10 +0900)
committer안주원/Common Platform Lab(SR)/Principal Engineer/삼성전자 <juwon.ahn@samsung.com>
Wed, 29 Apr 2020 06:10:47 +0000 (15:10 +0900)
* Move show code in Preload to OnPreCreate

src/XSF/Xamarin.Forms.Platform.Tizen/FormsApplication.cs
src/XSF/Xamarin.Forms.Platform.Tizen/PreloadedWindow.cs

index 7e8751a267ffd7d202cc97295c895d3cac2608d2..c2a06fb1e7cbfea259e56690dcdda086304a639c 100644 (file)
@@ -62,8 +62,17 @@ namespace Xamarin.Forms.Platform.Tizen
                        base.OnPreCreate();
                        Application.ClearCurrent();
                        PreloadedWindow window = PreloadedWindow.GetInstance() ?? new PreloadedWindow();
-                       BaseLayout = window.BaseLayout;
+
                        MainWindow = window.Window;
+                       MainWindow.Show();
+                       if (window.BaseConformant != null)
+                       {
+                               window.BaseConformant.Show();
+                       }
+
+                       BaseLayout = window.BaseLayout;
+                       BaseLayout.Show();
+
                        BaseCircleSurface = window.BaseCircleSurface;
                        Forms.CircleSurface = BaseCircleSurface;
                }
index 48d38dd85d5deecd7bd6fdcd7ea6bc30d79638a4..cd6bd5de82cca540e9f3c68c5ed0dc123233550f 100644 (file)
@@ -1,6 +1,7 @@
 using ElmSharp;
 using ElmSharp.Wearable;
 using ELayout = ElmSharp.Layout;
+using EConformant = ElmSharp.Conformant;
 
 namespace Xamarin.Forms.Platform.Tizen
 {
@@ -28,6 +29,12 @@ namespace Xamarin.Forms.Platform.Tizen
                        protected set;
                }
 
+               public EConformant BaseConformant
+               {
+                       get;
+                       protected set;
+               }
+
                public ELayout BaseLayout
                {
                        get;
@@ -42,14 +49,12 @@ namespace Xamarin.Forms.Platform.Tizen
                protected void Initialize()
                {
                        Window = new Window("FormsWindow");
-                       Window.Show();
 
                        var conformant = new Conformant(Window);
-                       conformant.Show();
+                       BaseConformant = conformant;
 
                        var layout = new ELayout(conformant);
-                       layout.SetTheme("layout", "application", "default");
-                       layout.Show();
+                       layout.SetTheme("layout", "application", "default");                    
 
                        BaseLayout = layout;