[NUI] remove unnecessary interop bind and add state control in OnEnabled.
authorEverLEEst(SangHyeon Lee) <sh10233.lee@samsung.com>
Tue, 22 Feb 2022 06:02:33 +0000 (15:02 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 22 Mar 2022 08:34:14 +0000 (17:34 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.ActorInternal.cs
src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs

index b28de7b..fed28c7 100755 (executable)
@@ -218,13 +218,6 @@ namespace Tizen.NUI
             [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool IsFocusableInTouch(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_SetUserInteractionEnabled")]
-            public static extern void SetUserInteractionEnabled(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
-
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_IsUserInteractionEnabled")]
-            [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
-            public static extern bool IsUserInteractionEnabled(global::System.Runtime.InteropServices.HandleRef jarg1);
-
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_SetSizeScalePolicy")]
             public static extern void SetSizeScalePolicy(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
 
index 2f4d277..9a16d10 100755 (executable)
@@ -1277,13 +1277,21 @@ namespace Tizen.NUI.BaseComponents
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected virtual void OnEnabled(bool enabled)
         {
-            if (enableControlState)
+            if (enabled)
             {
-                if (enabled)
+                if (State == View.States.Disabled)
+                {
+                    State = View.States.Normal;
+                }
+                if (enableControlState)
                 {
                     ControlState -= ControlState.Disabled;
                 }
-                else
+            }
+            else
+            {
+                State = View.States.Disabled;
+                if (enableControlState)
                 {
                     ControlState += ControlState.Disabled;
                 }