Notify view size and position updated by layout.
authorJiyun Yang <ji.yang@samsung.com>
Fri, 14 Mar 2025 07:33:02 +0000 (16:33 +0900)
committerTaehyub Kim <taehyub.kim@samsung.com>
Tue, 18 Mar 2025 06:08:52 +0000 (15:08 +0900)
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/ViewEvent.cs
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs

index 28781f2590167b8d2bbc6283272e9b2ab84cfed5..9dc225de2bf65dc7c59b486b01ce15a12a55e3fd 100755 (executable)
@@ -886,6 +886,14 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        internal virtual void NotifyLayoutUpdated(bool forceTriggerRelayout)
+        {
+            if (forceTriggerRelayout && !IsDisposedOrQueued)
+            {
+                onRelayoutEventHandler?.Invoke(this, EventArgs.Empty);
+            }
+        }
+
         // Callback for View HitTestResultSignal
         private bool OnHitTestResult(IntPtr view, IntPtr touchData)
         {
index 963a0303de94b672b8db5117d7bc50064d35cd31..58343a004a7d0af892b5409eea668d727db73588 100755 (executable)
@@ -604,12 +604,14 @@ namespace Tizen.NUI
                         if (!Owner.LayoutWidth.IsFixedValue || !Owner.LayoutHeight.IsFixedValue)
                         {
                             Owner.SetSize(right - left, bottom - top);
+                            Owner.NotifyLayoutUpdated(false);
                         }
                     }
                     else
                     {
                         Owner.SetSize(right - left, bottom - top);
                         Owner.SetPosition(left, top);
+                        Owner.NotifyLayoutUpdated(false);
                     }
                 }
 
@@ -620,7 +622,6 @@ namespace Tizen.NUI
             return changed;
         }
 
-
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected virtual void Dispose(bool disposing)
         {