Merge "Fix Left/Right/Up/DownFocusableView bug =>If app set the Left/Right/Up/DownFoc...
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
index e26a1e9..f312226 100755 (executable)
@@ -91,7 +91,7 @@ namespace Tizen.NUI.BaseComponents
         /// Retrieves the number of children held by the view.
         /// </summary>
         /// <seealso cref="Container.GetChildCount" />
-        protected override uint GetChildCount()
+        public override uint GetChildCount()
         {
             return Convert.ToUInt32(Children.Count);
         }
@@ -100,7 +100,7 @@ namespace Tizen.NUI.BaseComponents
         /// Gets the views parent.
         /// </summary>
         /// <seealso cref="Container.GetParent()" />
-        protected override Container GetParent()
+        public override Container GetParent()
         {
             IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
 
@@ -112,19 +112,9 @@ namespace Tizen.NUI.BaseComponents
             return basehandle as Container;
         }
 
-        /// <summary>
-        /// This is temporal API. Currently Parent returns View but Container class has been introduced so 'View Parent' will be changed 'Container Parent' later soon, then this will be removed
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
-        public Container GetContainerParent()
-        {
-            return this.GetParent();
-        }
-
         internal bool IsTopLevelView()
         {
-            if(GetContainerParent() is Layer)
+            if(GetParent() is Layer)
             {
                 return true;
             }
@@ -1924,7 +1914,14 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                LeftFocusableViewId = (int)value.GetId();
+                if(value)
+                {
+                    LeftFocusableViewId = (int)value.GetId();
+                }
+                else
+                {
+                    LeftFocusableViewId = -1;
+                }
             }
         }
 
@@ -1947,7 +1944,14 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                RightFocusableViewId = (int)value.GetId();
+                if(value)
+                {
+                    RightFocusableViewId = (int)value.GetId();
+                }
+                else
+                {
+                    RightFocusableViewId = -1;
+                }
             }
         }
 
@@ -1970,7 +1974,14 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                UpFocusableViewId = (int)value.GetId();
+                if(value)
+                {
+                    UpFocusableViewId = (int)value.GetId();
+                }
+                else
+                {
+                    UpFocusableViewId = -1;
+                }
             }
         }
 
@@ -1993,7 +2004,14 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                DownFocusableViewId = (int)value.GetId();
+                if(value)
+                {
+                    DownFocusableViewId = (int)value.GetId();
+                }
+                else
+                {
+                    DownFocusableViewId = -1;
+                }
             }
         }
 
@@ -4487,4 +4505,4 @@ namespace Tizen.NUI.BaseComponents
         /// </summary>
         RTL
     }
-}
\ No newline at end of file
+}