Make LayoutParamPolicies public
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 29 Apr 2021 06:01:33 +0000 (15:01 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 7 May 2021 03:54:19 +0000 (12:54 +0900)
This is ACR patch to make LayoutParamPolicies public.

This pull request includes static class LayoutParamPolicies and its
const int MatchParent and WrapContent which decide the size of View when
the View is laid out in its parent View.

src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/BaseComponents/ViewEnum.cs

index 165d04b..46fe88d 100755 (executable)
@@ -2225,8 +2225,23 @@ namespace Tizen.NUI.BaseComponents
         }
 
         ///<summary>
-        /// The required policy for this dimension, LayoutParamPolicies enum or exact value.
+        /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
         ///</summary>
+        /// <example>
+        /// <code>
+        /// // matchParentView matches its size to its parent size.
+        /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
+        /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
+        ///
+        /// // wrapContentView wraps its children with their desired size.
+        /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
+        /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
+        ///
+        /// // exactSizeView shows itself with an exact size.
+        /// exactSizeView.WidthSpecification = 100;
+        /// exactSizeView.HeightSpecification = 100;
+        /// </code>
+        /// </example>
         /// <since_tizen> 6 </since_tizen>
         public int WidthSpecification
         {
@@ -2253,8 +2268,23 @@ namespace Tizen.NUI.BaseComponents
         }
 
         ///<summary>
-        /// The required policy for this dimension, LayoutParamPolicies enum or exact value.
+        /// The required policy for this dimension, <see cref="LayoutParamPolicies"/> values or exact value.
         ///</summary>
+        /// <example>
+        /// <code>
+        /// // matchParentView matches its size to its parent size.
+        /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
+        /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
+        ///
+        /// // wrapContentView wraps its children with their desired size.
+        /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
+        /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
+        ///
+        /// // exactSizeView shows itself with an exact size.
+        /// exactSizeView.WidthSpecification = 100;
+        /// exactSizeView.HeightSpecification = 100;
+        /// </code>
+        /// </example>
         /// <since_tizen> 6 </since_tizen>
         public int HeightSpecification
         {
index 63520b9..dd07402 100755 (executable)
@@ -38,23 +38,32 @@ namespace Tizen.NUI.BaseComponents
     }
 
     /// <summary>
-    /// [Draft] Available policies for layout parameters
+    /// Layout policies to decide the size of View when the View is laid out in its parent View.
+    /// LayoutParamPolicies.MatchParent and LayoutParamPolicies.WrapContent can be assigned to <see cref="View.WidthSpecification"/> and <see cref="View.HeightSpecification"/>.
     /// </summary>
-    /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-    [EditorBrowsable(EditorBrowsableState.Never)]
+    /// <example>
+    /// <code>
+    /// // matchParentView matches its size to its parent size.
+    /// matchParentView.WidthSpecification = LayoutParamPolicies.MatchParent;
+    /// matchParentView.HeightSpecification = LayoutParamPolicies.MatchParent;
+    ///
+    /// // wrapContentView wraps its children with their desired size.
+    /// wrapContentView.WidthSpecification = LayoutParamPolicies.WrapContent;
+    /// wrapContentView.HeightSpecification = LayoutParamPolicies.WrapContent;
+    /// </code>
+    /// </example>
+    /// <since_tizen> 9 </since_tizen>
     public static class LayoutParamPolicies
     {
         /// <summary>
-        /// Constant which indicates child size should match parent size
+        /// Constant which indicates child size should match parent size.
         /// </summary>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 9 </since_tizen>
         public const int MatchParent = -1;
         /// <summary>
-        /// Constant which indicates parent should take the smallest size possible to wrap it's children with their desired size
+        /// Constant which indicates parent should take the smallest size possible to wrap its children with their desired size.
         /// </summary>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
+        /// <since_tizen> 9 </since_tizen>
         public const int WrapContent = -2;
     }