From: Md. Shahrukh Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics Date: Fri, 6 Sep 2024 06:17:42 +0000 (+0600) Subject: Fixed Buttons cannot be pressed in the Create playlist popup. X-Git-Tag: accepted/tizen/unified/x/20240923.124445~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1b1a5f7aa81fb59443d90887799de5f2ed88498;p=profile%2Fiot%2Fapps%2Fdotnet%2Fmusic-player.git Fixed Buttons cannot be pressed in the Create playlist popup. [Problem] [TNINE-4168] Buttons cannot be pressed in the Create playlist popup. [Cause & Measure] Cause : Different ratio was not implemented and a gap between inputField and buttons was introduced. Measure : Implemented ratio in button sizes and removed the gap between inputField and buttons. Change-Id: I28d973bd5180c9c737f96491fb5ae8b617f9bbf9 Signed-off-by: Md. Shahrukh Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics --- diff --git a/music-player/Common/AppConstants.cs b/music-player/Common/AppConstants.cs index c6c4a96..fe24663 100755 --- a/music-player/Common/AppConstants.cs +++ b/music-player/Common/AppConstants.cs @@ -1,7 +1,12 @@ -namespace MusicPlayer.Common +using Tizen.NUI; + +namespace MusicPlayer.Common { class AppConstants { + public static int WindowWidth = NUIApplication.GetDefaultWindow().Size.Width; + public static int WindowHeight = NUIApplication.GetDefaultWindow().Size.Height; + // LogTag public const string LogTag = "MUSIC_PLAYER"; // KeyCodes diff --git a/music-player/Views/PlaylistView.cs b/music-player/Views/PlaylistView.cs index 2baaa3e..6a1e0ab 100755 --- a/music-player/Views/PlaylistView.cs +++ b/music-player/Views/PlaylistView.cs @@ -152,6 +152,7 @@ namespace MusicPlayer.Views FontStyle = UIFontStyles.AllNormal, TranslatableText = "IDS_CREATE_PLAYLIST", WidthSpecification = LayoutParamPolicies.MatchParent, + HeightSpecification = LayoutParamPolicies.WrapContent, HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, }; @@ -239,6 +240,7 @@ namespace MusicPlayer.Views { Name = "AlertDialogCancelButton", ThemeChangeSensitive = true, + PointSize = ((12 * 1920) / AppConstants.WindowWidth).SpToPx(), }; cancelbutton.TextLabel.FontStyle = UIFontStyles.AllNormal; return cancelbutton; @@ -248,10 +250,11 @@ namespace MusicPlayer.Views { Button createButton = new Button() { - Size2D = new Size2D(336, 96).SpToPx(), + Size2D = new Size2D(300, 80).SpToPx(), Name = "AlertDialogCreateButton", TranslatableText = "IDS_CREATE", - PointSize = 33.SpToPx(), + PointSize = ((12 * 1920) / AppConstants.WindowWidth).SpToPx(), + CornerRadius = 24.SpToPx(), }; createButton.TextLabel.FontStyle = UIFontStyles.AllNormal; return createButton; @@ -312,7 +315,7 @@ namespace MusicPlayer.Views WidthSpecification = LayoutParamPolicies.MatchParent, Layout = new RelativeLayout() { - Margin = new Extents(0, 0, 64, 0).SpToPx(), + Margin = new Extents(0, 0, 0, 0).SpToPx(), } }; return buttonArea; @@ -367,7 +370,7 @@ namespace MusicPlayer.Views ThemeChangeSensitive = true, StyleName = "Dialogs", WidthSpecification = DeviceInfo.IsPortrait ? Window.Instance.Size.Width - 64.SpToPx() : (int)(Window.Instance.Size.Width * 0.6f), - HeightSpecification = 466.SpToPx(), + HeightSpecification = 380.SpToPx(), Layout = new LinearLayout() { Padding = new Extents(80, 80, 40, 40).SpToPx(), diff --git a/music-player/res/themes/dark.xaml b/music-player/res/themes/dark.xaml index ecea84d..2449dc1 100755 --- a/music-player/res/themes/dark.xaml +++ b/music-player/res/themes/dark.xaml @@ -179,7 +179,7 @@ Id="DarkTheme"> - + *Resource*/images/dark/cancel_button_bg.png diff --git a/music-player/res/themes/light.xaml b/music-player/res/themes/light.xaml index a881f89..17e88e5 100755 --- a/music-player/res/themes/light.xaml +++ b/music-player/res/themes/light.xaml @@ -179,7 +179,7 @@ Id="LightTheme"> - + *Resource*/images/light/cancel_button_bg.png