Revert "[NUI] Support Layout property by ViewStyle"
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Layouting / FlexLayout.cs
index be9e542..e5c19cb 100755 (executable)
@@ -393,18 +393,6 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal static FlexLayout DownCast(BaseHandle handle)
-        {
-            FlexLayout ret = new FlexLayout(Interop.FlexLayout.DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        internal FlexLayout(FlexLayout other) : this(Interop.FlexLayout.NewFlexLayout(FlexLayout.getCPtr(other)), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
         internal FlexLayout.AlignmentType GetFlexAlignment()
         {
             FlexLayout.AlignmentType ret = (FlexLayout.AlignmentType)Interop.FlexLayout.GetFlexAlignment(swigCPtr);
@@ -451,7 +439,7 @@ namespace Tizen.NUI
             get => (FlexJustification)Interop.FlexLayout.GetFlexJustification(swigCPtr);
             set
             {
-                if (value < FlexJustification.FlexStart || value > FlexJustification.SpaceAround)
+                if (value < FlexJustification.FlexStart || value > FlexJustification.SpaceEvenly)
                     throw new InvalidEnumArgumentException(nameof(Justification));
 
                 Interop.FlexLayout.SetFlexJustification(swigCPtr, (int)value);
@@ -570,11 +558,15 @@ namespace Tizen.NUI
             /// </summary>
             SpaceBetween,
             /// <summary>
+            /// Items are positioned with equal space before, and after the lines.<br/>
+            /// </summary>
+            SpaceAround,
+            /// <summary>
             /// Items are positioned with equal space before, between, and after the lines.<br/>
-            /// Compared to <see cref="FlexJustification.SpaceBetween"/> using <see cref="FlexJustification.SpaceAround"/>
-            /// will result in space being distributed to the beginning of the first child and end of the last child.
+            /// Spaces are distributed equally to the beginning of the first child, between each child, and the end of the last child.
             /// </summary>
-            SpaceAround
+            /// <since_tizen> 9 </since_tizen>
+            SpaceEvenly
         }
 
         /// <summary>
@@ -666,10 +658,10 @@ namespace Tizen.NUI
                                     new LayoutLength(Padding.Top + Padding.Bottom),
                                     new LayoutLength(child.HeightSpecification));
 
-            childLayout.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
+            childLayout?.Measure(childWidthMeasureSpec, childHeightMeasureSpec);
 
-            measureSize.width = childLayout.MeasuredWidth.Size.AsRoundedValue();
-            measureSize.height = childLayout.MeasuredHeight.Size.AsRoundedValue();
+            measureSize.width = (childLayout == null) ? 0 : childLayout.MeasuredWidth.Size.AsRoundedValue();
+            measureSize.height = (childLayout == null) ? 0 : childLayout.MeasuredHeight.Size.AsRoundedValue();
         }
 
         void InsertChild(LayoutItem child)
@@ -821,7 +813,7 @@ namespace Tizen.NUI
                     // To resolve the above issue, child layout's measured size is set with the child view's size calculated by dali-toolkit's YOGA APIs.
                     MeasureSpecification widthSpec = new MeasureSpecification(new LayoutLength(frame.Z - frame.X), MeasureSpecification.ModeType.Exactly);
                     MeasureSpecification heightSpec = new MeasureSpecification(new LayoutLength(frame.W - frame.Y), MeasureSpecification.ModeType.Exactly);
-                    MeasureChildWithMargins(childLayout, widthSpec, new LayoutLength(0), heightSpec, new LayoutLength(0));
+                    MeasureChildWithoutPadding(childLayout, widthSpec, heightSpec);
 
                     childLayout.Layout(new LayoutLength(frame.X), new LayoutLength(frame.Y), new LayoutLength(frame.Z), new LayoutLength(frame.W));
                     frame.Dispose();