From: Seoyeon Kim Date: Fri, 7 Oct 2022 06:30:26 +0000 (+0900) Subject: Change Navigator Pop() code to use Bundle by sending message X-Git-Tag: accepted/tizen/unified/20221007.171847^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F37%2F282637%2F1;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsetting-accessibility.git Change Navigator Pop() code to use Bundle by sending message - If only Navigator.Pop(), the widget just shows a black screen when Back button. - So, changed to use Bundle API and update Content info. Change-Id: I88fed3b4ac321023ae27f44fd359f80474fc44e1 Signed-off-by: Seoyeon Kim --- diff --git a/Settings/SettingAccessibility/SettingWidgetAccessibility.cs b/Settings/SettingAccessibility/SettingWidgetAccessibility.cs index 9ee614f..020b39f 100755 --- a/Settings/SettingAccessibility/SettingWidgetAccessibility.cs +++ b/Settings/SettingAccessibility/SettingWidgetAccessibility.cs @@ -47,7 +47,8 @@ namespace SettingAccessibility backButton.Clicked += (object source, ClickedEventArgs args) => { - navigator.Pop(); + // Instead of using `navigator.Pop();` code + RequestWidgetPop(); }; appBar.NavigationContent = backButton; @@ -160,6 +161,15 @@ namespace SettingAccessibility settingScroll.Add(label); } + protected void RequestWidgetPop() + { + // Update Widget Content by sending message to pop the fourth page. + Bundle nextBundle = new Bundle(); + nextBundle.AddItem("WIDGET_ACTION", "POP"); + String encodedBundle = nextBundle.Encode(); + SetContentInfo(encodedBundle); + } + protected override void OnPause() { base.OnPause();