Fix back button not working issue 43/283343/1 accepted/tizen/unified/20221111.105330
authorWootak Jung <wootak.jung@samsung.com>
Tue, 25 Oct 2022 01:36:06 +0000 (10:36 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Tue, 25 Oct 2022 01:36:06 +0000 (10:36 +0900)
Change-Id: I85b90b76d842549b113943e47d205096146d113a
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
SettingBluetooth/SettingBluetooth/View/BtMainView.cs
packaging/org.tizen.cssetting-bluetooth-1.0.0.tpk

index e6749ee6e84a4f26fccbb589503cf8556293ff43..6150b77a8bcacbaa8d8d3181ecfedc53fa3669c1 100644 (file)
@@ -8,6 +8,7 @@ using Tizen;
 using SettingBluetooth.res.locale;
 using SettingBluetooth.Model;
 using SettingBluetooth.Controller;
+using Tizen.Applications;
 
 namespace SettingBluetooth
 {
@@ -53,6 +54,15 @@ namespace SettingBluetooth
             }
         }
 
+        protected void RequestWidgetPop()
+        {
+            // Pop Widget Content by sending message
+            Bundle nextBundle = new Bundle();
+            nextBundle.AddItem("WIDGET_ACTION", "POP");
+            String encodedBundle = nextBundle.Encode();
+            SetContentInfo(encodedBundle);
+        }
+
         protected override void OnCreate(string contentInfo, Window window)
         {
             var appBar = new AppBar()
@@ -60,6 +70,14 @@ namespace SettingBluetooth
                 Title = Resources.IDS_BT_BODY_BLUETOOTH,
             };
 
+            var appBarStyle = ThemeManager.GetStyle("Tizen.NUI.Components.AppBar");
+            var navigationContent = new Button(((AppBarStyle)appBarStyle).BackButton);
+            navigationContent.Clicked += (o, e) =>
+            {
+                RequestWidgetPop();
+            };
+            appBar.NavigationContent = navigationContent;
+
             mMainView = new View()
             {
                 Layout = new LinearLayout()
@@ -100,6 +118,7 @@ namespace SettingBluetooth
                 Content = mMainView,
             };
 
+            window.BackgroundColor = Color.Transparent;
             window.GetDefaultNavigator().Push(mMainPage);
         }
     }
index ff55c71e6db04f090e9f7737324b544c0a07805d..0283692b70e9dda400ed33fbe63617ed60bc4ad5 100644 (file)
Binary files a/packaging/org.tizen.cssetting-bluetooth-1.0.0.tpk and b/packaging/org.tizen.cssetting-bluetooth-1.0.0.tpk differ