From: Md. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics Date: Fri, 20 Sep 2024 04:22:07 +0000 (+0600) Subject: Fixed Flicking issue at launch time when notification exist. X-Git-Tag: accepted/tizen/unified/20240920.172823~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F84%2F317884%2F1;p=profile%2Fiot%2Fapps%2Fdotnet%2Fnotifications.git Fixed Flicking issue at launch time when notification exist. [Problem][TNINE-4267] When there is a notification in the list, windows makes a flicking at the launch time [Cause & Measure] Cause : Window is resized twice by display server after launch. Measure : Added a delay of 500ms for adding NUIApplication.Window.Resized event handler to avoid the two unwanted resize after launch. Change-Id: Ic59014ee078b02448d6c1e810c9575e638366386 Signed-off-by: Md. Farhan Mahtab/NC eXperience Group /SRBD/Engineer/Samsung Electronics --- diff --git a/Notifications/ViewManager.cs b/Notifications/ViewManager.cs index e370b03..4072494 100644 --- a/Notifications/ViewManager.cs +++ b/Notifications/ViewManager.cs @@ -15,6 +15,7 @@ */ using System; +using System.Timers; using Tizen.Applications.NotificationEventListener; using Tizen.NUI; using Notifications.Common; @@ -28,6 +29,7 @@ namespace Notifications private NotificationsViewModel notificationsViewModel; private NotificationsDetailViewModel notificationsDetailViewModel; private BaseView baseView; + private System.Timers.Timer timer; public ViewManager() { notificationsViewModel = new NotificationsViewModel(); @@ -38,7 +40,14 @@ namespace Notifications baseView.BackKeyPressed += OnBackKeyPressed; Window.Instance.Add(baseView); - Window.Instance.Resized += OnWindowResized; + + timer = new System.Timers.Timer(500); + timer.Elapsed += (s, e) => + { + Window.Instance.Resized += OnWindowResized; + timer.Stop(); + }; + timer.Start(); ThemeManager.ThemeChanged += OnThemeChanged; }