Fixed FullScreen mode issue in settings app 54/316154/1
authorMobaswirul Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics <mobaswirul.i@samsung.com>
Wed, 14 Aug 2024 06:47:40 +0000 (12:47 +0600)
committerMobaswirul Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics <mobaswirul.i@samsung.com>
Wed, 14 Aug 2024 06:47:40 +0000 (12:47 +0600)
[Problem] [TNINE-4155] In Maximize window mode after entering any gadget when we click the backutton, the window snap to the bottom right side.

[Cause & Measure]
 Causes  : Object's type was used to decide whether to restore window or not.
 Measure : Used a boolean flag to decide if the window was maximized for gadget.

Change-Id: Id10524d1253862015738a09b7f87b2e2e09c9e0a
Signed-off-by: Mobaswirul Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics <mobaswirul.i@samsung.com>
SettingCore/GadgetNavigation.cs
SettingCore/Views/BackButton.cs
packaging/org.tizen.cssettings-1.2.0.tpk

index f809f5c650db2fd555a1db6af59160d85ff5a44b..373a4c7ec36d46571db4dcf7c77c8c52f4eab6b4 100644 (file)
@@ -23,6 +23,8 @@ namespace SettingCore
 
         private static Stack<View> gadgetViews = new Stack<View>();
 
+        private static bool setToFullScreen = false;
+
         static GadgetNavigation()
         {
             SystemSettings.LocaleLanguageChanged += (object sender, LocaleLanguageChangedEventArgs e) => {
@@ -53,29 +55,23 @@ namespace SettingCore
 
         public static void SetFullScreenMode(bool fullScreen)
         {
+            setToFullScreen = !NUIApplication.GetDefaultWindow().IsMaximized() && fullScreen;
             OnWindowModeChanged?.Invoke(null, fullScreen);
         }
 
         public static void NavigateBack()
         {
-            var baseContentPage = NUIApplication.GetDefaultWindow().GetDefaultNavigator().Peek();
-
-            if (baseContentPage is BaseContentPage)
+            try
             {
+                if (setToFullScreen)
+                {
+                    SetFullScreenMode(false);
+                }
                 RemoveGadgetView();
             }
-            else
+            catch (Exception ex)
             {
-                SetFullScreenMode(false);
-
-                try
-                {
-                    RemoveGadgetView();
-                }
-                catch (Exception ex)
-                {
-                    Logger.Warn($"{ex.Message}");
-                }
+                Logger.Warn($"{ex.Message}");
             }
         }
 
index 7fef07ffe268797514839e9694de3430ba09601d..244393c686f2b39a3a10af0ed3b8bb3d20b83630 100644 (file)
@@ -15,6 +15,7 @@ namespace SettingCore.Views
         public BackButton() : base()
         {
             AccessibilityRole = Role.PushButton;
+            AccessibilityHighlightable = true;
             BackgroundColor = BackgroundColors.Normal;
             CornerRadius = 8f.SpToPx();
             Size = new Size(40, 40).SpToPx();
index 85cd7cefa5d9667a5c505502ace833b2eaf92553..ef15f7431bcd81d856ed7da0810a70e583cc3437 100644 (file)
Binary files a/packaging/org.tizen.cssettings-1.2.0.tpk and b/packaging/org.tizen.cssettings-1.2.0.tpk differ