Use a function to push widgets 65/282865/1 accepted/tizen/unified/20221013.014008
authorkiso.chang <kiso.chang@samsung.com>
Wed, 12 Oct 2022 12:39:55 +0000 (21:39 +0900)
committerkiso.chang <kiso.chang@samsung.com>
Wed, 12 Oct 2022 12:40:51 +0000 (21:40 +0900)
Change-Id: Ia8d9c3921db26702ddc8c9d98425af466a0e6b40
Signed-off-by: kiso.chang <kiso.chang@samsung.com>
SettingView/SettingMenuManager.cs
packaging/org.tizen.SettingView-1.0.0.tpk

index c5d8e6fe7006bba93407ef035561d996dd17aa5f..f9685cfdca704949e96780d0acc89b0048161c13 100644 (file)
@@ -250,53 +250,7 @@ namespace SettingView
                 if (widgetAction.Equals("PUSH"))\r
                 {\r
                     Tizen.Log.Debug("NUI", "WIDGET_ACTION : PUSH!\n");\r
-\r
-                    if (Int32.TryParse(widgetWidth, out int width) && Int32.TryParse(widgetHeight, out int height))\r
-                    {\r
-                        Bundle bundle2 = new Bundle();\r
-                        bundle2.AddItem(" ", " ");\r
-                        String encodedBundle2 = bundle2.Encode();\r
-\r
-                        WidgetView widgetview = WidgetViewManager.Instance.AddWidget(widgetID, encodedBundle2, width, height, 0.0f);\r
-                        if (widgetview != null)\r
-                        {\r
-                            widgetview.WidgetContentUpdated += OnWidgetContentUpdatedCB;\r
-                            widgetview.Preview = false;\r
-                            NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new ContentPage() { Content = widgetview });\r
-                        }\r
-                    }\r
-#if false\r
-                    if (widgetPage.Equals("CONTENT_PAGE"))\r
-                    {\r
-                        if (widgetID.Equals("secondPage@NUISettingsReset"))\r
-                        {\r
-                            NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new ContentPage() { Content = secondPageWidgetView });\r
-                        }\r
-                        else if (widgetID.Equals("thirdPage@NUISettingsReset"))\r
-                        {\r
-                            NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new ContentPage() { Content = thirdPageWidgetView });\r
-                        }\r
-                        else if (widgetID.Equals("fourthPage@NUISettingsReset"))\r
-                        {\r
-                            NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new ContentPage() { Content = fourthPageWidgetView });\r
-                        }\r
-                    }\r
-                    else if (widgetPage.Equals("DIALOG_PAGE"))\r
-                    {\r
-                        if (widgetID.Equals("secondPage@NUISettingsReset"))\r
-                        {\r
-                            NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new DialogPage() { Content = secondPageWidgetView });\r
-                        }\r
-                        else if (widgetID.Equals("thirdPage@NUISettingsReset"))\r
-                        {\r
-                            NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new DialogPage() { Content = thirdPageWidgetView });\r
-                        }\r
-                        else if (widgetID.Equals("fourthPage@NUISettingsReset"))\r
-                        {\r
-                            NUIApplication.GetDefaultWindow().GetDefaultNavigator().Push(new DialogPage() { Content = fourthPageWidgetView });\r
-                        }\r
-                    }\r
-#endif\r
+                    PushWidget(NUIApplication.GetDefaultWindow(), widgetID);\r
                 }\r
                 else if (widgetAction.Equals("POP"))\r
                 {\r
index ac7b70b8ac0a3fff831dbada95149714ab328bde..b3c763d374edaaf2bf54ddbbb53b62beb034a70e 100644 (file)
Binary files a/packaging/org.tizen.SettingView-1.0.0.tpk and b/packaging/org.tizen.SettingView-1.0.0.tpk differ