[NUI] Fix Navigator not to make ContentPage.Content hide
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 10 May 2022 03:42:30 +0000 (12:42 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Tue, 10 May 2022 06:09:58 +0000 (15:09 +0900)
ContentPage.Content becomes hidden when push/pop were finished to
unregister accessibility.
i.e. Show() registers accessibility.
     Hide() unregisters accessibility.

Previously, ContentPage.Content was invisible when push/pop were
started because the invisible state remained since the previous
push/pop were finished.
e.g. PageTransitionSample in Tizen.NUI.Samples

Now, ContentPage.Content is visible when push/pop are started.
i.e. SetVisible(true) is called for ContentPage.Content to make it
     visible but not to register accessibility at that time.

src/Tizen.NUI.Components/Controls/Navigation/Navigator.cs

index 8094b7d..c0ce957 100755 (executable)
@@ -359,6 +359,9 @@ namespace Tizen.NUI.Components
 
                 page.Opacity = 0.0f;
                 page.SetVisible(true);
+                // Set Content visible because it was hidden by HideContentOfPage.
+                (page as ContentPage).Content?.SetVisible(true);
+
                 newAnimation = new Animation(1000);
                 newAnimation.AnimateTo(page, "Opacity", 1.0f, 0, 1000);
                 newAnimation.EndAction = Animation.EndActions.StopFinal;
@@ -444,6 +447,9 @@ namespace Tizen.NUI.Components
 
                 newTop.Opacity = 1.0f;
                 newTop.SetVisible(true);
+                // Set Content visible because it was hidden by HideContentOfPage.
+                (newTop as ContentPage).Content?.SetVisible(true);
+
                 newAnimation = new Animation(1000);
                 newAnimation.AnimateTo(newTop, "Opacity", 1.0f, 0, 1000);
                 newAnimation.EndAction = Animation.EndActions.StopFinal;
@@ -741,7 +747,12 @@ namespace Tizen.NUI.Components
         private TransitionSet CreateTransitions(Page currentTopPage, Page newTopPage, bool pushTransition)
         {
             currentTopPage.SetVisible(true);
+            // Set Content visible because it was hidden by HideContentOfPage.
+            (currentTopPage as ContentPage).Content?.SetVisible(true);
+
             newTopPage.SetVisible(true);
+            // Set Content visible because it was hidden by HideContentOfPage.
+            (newTopPage as ContentPage).Content?.SetVisible(true);
 
             List<View> taggedViewsInNewTopPage = new List<View>();
             RetrieveTaggedViews(taggedViewsInNewTopPage, newTopPage, true);