Fixed Buttons cannot be pressed in the Create playlist popup. 41/317241/3
authorMd. Shahrukh Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics <shahrukh.i@samsung.com>
Fri, 6 Sep 2024 06:17:42 +0000 (12:17 +0600)
committerMd. Shahrukh Islam/NC eXperience Group /SRBD/Engineer/Samsung Electronics <shahrukh.i@samsung.com>
Fri, 6 Sep 2024 10:46:48 +0000 (16:46 +0600)
[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 <shahrukh.i@samsung.com>
music-player/Common/AppConstants.cs
music-player/Views/PlaylistView.cs
music-player/res/themes/dark.xaml
music-player/res/themes/light.xaml

index c6c4a96436ab0da0e704a07c57da515a151f9d21..fe2466357b4c0ad7a165106394f459172d5a720f 100755 (executable)
@@ -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
index 2baaa3e68859ce89702a56ba4cb5df01e03447e2..6a1e0abe471de9e4562dd48aa0eacc6219ea0176 100755 (executable)
@@ -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(),
index ecea84d1a3989c320094f602e46175da69db6519..2449dc12c485efa7c5cfeb845f0d92714e718bcc 100755 (executable)
@@ -179,7 +179,7 @@ Id="DarkTheme">
 
   <TextLabelStyle x:Key="TitleText" TextColor="#FFFFFF"/>
 
-  <c:ButtonStyle x:Key="CancelButton" Size="336sp, 96sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
+  <c:ButtonStyle x:Key="CancelButton" Size="300sp, 80sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
     <c:ButtonStyle.BackgroundImage>*Resource*/images/dark/cancel_button_bg.png</c:ButtonStyle.BackgroundImage>
     <c:ButtonStyle.Text>
       <TextLabelStyle TextColor="#FFFFFF" FontFamily="BreezeSans" PixelSize="32sp" TranslatableText="IDS_CANCEL"/>
index a881f892c4fc0e8766842b533cf2021b0b173433..17e88e50b2911dbd4d2b9edeef4ec3a62d46107f 100755 (executable)
@@ -179,7 +179,7 @@ Id="LightTheme">
 
   <TextLabelStyle x:Key="TitleText" TextColor="#000C2B"/>
 
-  <c:ButtonStyle x:Key="CancelButton" Size="336sp, 96sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
+  <c:ButtonStyle x:Key="CancelButton" Size="300sp, 80sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
     <c:ButtonStyle.BackgroundImage>*Resource*/images/light/cancel_button_bg.png</c:ButtonStyle.BackgroundImage>
     <c:ButtonStyle.Text>
       <TextLabelStyle TextColor="#000C2B" FontFamily="BreezeSans" PixelSize="32sp" TranslatableText="IDS_CANCEL"/>