[NUI] All Layers have an Absolute layout (#313)
[platform/core/csapi/tizenfx.git] / test / NUITestSample / NUITestSample / examples / layouting / custom-layout-test.cs
index e2ae421..d92d463 100755 (executable)
@@ -4,7 +4,7 @@ using Tizen.NUI;
 using Tizen.NUI.BaseComponents;
 using System.Collections.Generic;
 
-namespace NUILayoutSample
+namespace CustomLayoutByAbsoluteLayout
 {
     static class Images
     {
@@ -219,9 +219,7 @@ namespace NUILayoutSample
             Console.WriteLine($"CustomLayoutVertical OnLayout() END");
         }
     }
-
-
-
+    
     class Example : NUIApplication
     {
         public Example() : base()
@@ -253,7 +251,6 @@ namespace NUILayoutSample
             rootLayoutView.HeightSpecificationFixed = 1000;
             rootLayoutView.Position = new Position(0, 0, 0);
             rootLayoutView.BackgroundColor = Color.Magenta;
-            window.Add(rootLayoutView);
 
             linearContainer = new View();
             linearContainer.PositionUsesPivotPoint = true;
@@ -263,12 +260,6 @@ namespace NUILayoutSample
             linearContainer.KeyEvent += OnKeyEvent;
             linearContainer.Focusable = true;
 
-
-            rootLayoutView.Add(linearContainer);
-            //window.Add(linearContainer);
-            FocusManager.Instance.SetCurrentFocusView(linearContainer);
-            FocusManager.Instance.FocusIndicator = new View();
-
             for (int index = 0; index < MAX_CHILDREN - 3; index++)
             {
                 imageViews[index] = new ImageView(Images.s_images[index]);
@@ -291,6 +282,11 @@ namespace NUILayoutSample
 
             rootLayout = new AbsoluteLayout();
             rootLayoutView.Layout = rootLayout;
+
+            rootLayoutView.Add(linearContainer);
+            window.Add(rootLayoutView);
+            FocusManager.Instance.SetCurrentFocusView(linearContainer);
+            FocusManager.Instance.FocusIndicator = new View();
         }
 
         int cnt1 = 1;
@@ -337,12 +333,5 @@ namespace NUILayoutSample
             }
             return true;
         }
-
-        [STAThread]
-        static void Main(string[] args)
-        {
-            Example layoutSample = new Example();
-            layoutSample.Run(args);
-        }
     }
 }