Resolve DT wrong look of find hidden network popup (wrong size of buttons, input... 78/306178/2
authorSameer Kumar <sameer.kumar@samsung.com>
Fri, 16 Feb 2024 11:26:15 +0000 (16:56 +0530)
committerAnuj Kumar Singh <anujk.singh@samsung.com>
Tue, 27 Feb 2024 07:01:48 +0000 (12:31 +0530)
This patch:
 - Resolve https://jira.sec.samsung.net/browse/TNINE-383

Change-Id: Ica46e4afba77bca06cda26e6c71bd2ee5d0db97e
Signed-off-by: Sameer Kumar <sameer.kumar@samsung.com>
SettingWiFi/SettingWiFi/view/HiddenConnectPage.cs
packaging/org.tizen.cssetting-wifi-1.1.5.rpk

index d31c6e0093ead43ae19f64af6120a2108683155b..5419b64cb4b43ac3a0012396726b032066fff7ad 100755 (executable)
@@ -17,33 +17,136 @@ namespace SettingWiFi
 
         private TextField ssidField;
         private Button mFindButton;
+        private bool isLightTheme => IsLightTheme();
+        public SettingCore.Views.CancelButton cancelTextButton;
 
         internal HiddenConnectPage(WiFi wifi)
         {
             mWifi = wifi;
         }
 
+        internal bool IsLightTheme()
+        {
+            return ThemeManager.PlatformThemeId == ThemeManager.DefaultLightThemeName;
+        }
+
         internal void CreateComponents(APSource apSource)
         {
             mApSource = apSource;
             Content = CreateNewPage();
         }
 
+        internal TextField CreateSsidField()
+        {
+            PropertyMap placeholder = new PropertyMap();
+            placeholder.Add("color", new PropertyValue(isLightTheme ? new Color("#CACACA") : new Color("#666666")));
+            placeholder.Add("fontFamily", new PropertyValue("BreezeSans"));
+            placeholder.Add("pixelSize", new PropertyValue(24.SpToPx()));
+            placeholder.Add("text", new PropertyValue(Resources.IDS_ST_BODY_NETWORK_SSID));
+
+            var textField  = new TextField
+            {
+                FontFamily = "BreezeSans",
+                SizeWidth = 530.SpToPx(),
+                Placeholder = placeholder,
+                BackgroundColor = isLightTheme ? new Color("#FAFAFA") : new Color("#1D1A21"),
+                EnableCursorBlink = true,
+                PixelSize = 24.SpToPx(),
+                Margin = new Extents(0, 26, 0, 0).SpToPx(),
+            };
+
+            InputMethod inputSetting = new InputMethod
+            {
+                PanelLayout = InputMethod.PanelLayoutType.Normal,
+            };
+
+            var inputFilter = new Tizen.NUI.Text.InputFilter();
+            inputFilter.Rejected = "\t";
+            textField.SetInputFilter(inputFilter);
+
+           return textField;
+       }
+
+
+       private View CreateSsidView()
+       {
+           View entryView = new View()
+           {
+               WidthSpecification = LayoutParamPolicies.WrapContent,
+               HeightSpecification = LayoutParamPolicies.WrapContent,
+               Layout = new LinearLayout()
+               {
+                   LinearOrientation = LinearLayout.Orientation.Horizontal,
+               },
+               Margin = new Extents(35, 30, 0, 0).SpToPx(),
+           };
+
+           ssidField = CreateSsidField();
+
+           ssidField.TextChanged += OnTextChanged;
+           cancelTextButton = new SettingCore.Views.CancelButton();
+           cancelTextButton.Clicked += CancelTextButtonClicked;
+
+          entryView.Add(ssidField);
+          entryView.Add(cancelTextButton);
+
+          return entryView;
+      }
+
         private AlertDialog CreateNewPage()
         {
-            var findView = CreateNewView(200, 100);
+            var findView = new View()
+            {
+                BackgroundColor = isLightTheme ? new Color("#FAFAFA") : new Color("#16131A"),
+                WidthSpecification = LayoutParamPolicies.WrapContent,
+                HeightSpecification = LayoutParamPolicies.WrapContent,
+                Layout = new LinearLayout()
+                {
+                    LinearOrientation = LinearLayout.Orientation.Vertical,
+                },
+            };
+
+            findView.Add(AddSubTitle());
+
+            findView.Add(CreateSsidView());
 
-            ssidField = new TextField()
+            View separatorWrapper = new View()
             {
-                PlaceholderText = Resources.IDS_ST_BODY_NETWORK_SSID,
-                WidthSpecification = 400,
+                Layout = new LinearLayout()
+                {
+                    LinearOrientation = LinearLayout.Orientation.Vertical,
+                },
             };
-            ssidField.TextChanged += OnTextChanged;
-            findView.Add(ssidField);
 
-            var cancelButton = CreateCancelButton();
+            View separator = new View
+            {
+                Size = new Size(550.SpToPx(), 1),
+                BackgroundColor = new Color("#FF6200"),
+                Margin = new Extents(24, 82, 0, 16).SpToPx(),
+            };
+            separatorWrapper.Add(separator);
+
+            findView.Add(separatorWrapper);
+
+            var cancelButton = new Button("Tizen.NUI.Components.Button.Outlined")
+            {
+                WidthResizePolicy = ResizePolicyType.FitToChildren,
+                HeightResizePolicy = ResizePolicyType.FitToChildren,
+                Text = Resources.IDS_WIFI_SK_CANCEL,
+                Size = new Size(252, 48).SpToPx(),
+            };
+            cancelButton.Clicked += (object source, ClickedEventArgs args) =>
+            {
+                NUIApplication.GetDefaultWindow().GetDefaultNavigator().Pop();
+            };
 
-            mFindButton  = CreateButton(300, 80, Resources.IDS_WIFI_BUTTON_ADD);
+            mFindButton  = new Button("Tizen.NUI.Components.Button.Outlined")
+            {
+                WidthResizePolicy = ResizePolicyType.FitToChildren,
+                HeightResizePolicy = ResizePolicyType.FitToChildren,
+                Text = Resources.IDS_WIFI_BUTTON_ADD,
+                Size = new Size(252, 48).SpToPx(),
+            };
             mFindButton.IsEnabled = false;
             mFindButton.Clicked += (object source, ClickedEventArgs args) =>
             {
@@ -62,6 +165,21 @@ namespace SettingWiFi
             return alt;
         }
 
+        private View AddSubTitle()
+        {
+            var textSubTitle = new TextLabel(Resources.IDS_WIFI_BODY_ENTER_NETWORK_NAME)
+            {
+                FontFamily = "BreezeSans",
+                PixelSize = 24.SpToPx(),
+                SizeWidth = 618.SpToPx(),
+                MultiLine = true,
+                LineWrapMode = LineWrapMode.Word,
+                Margin = new Extents(24, 24, 0, 24).SpToPx(),
+            };
+
+            return textSubTitle;
+        }
+
         private View CreateNewView(int width, int height)
         {
             var view = new View()
@@ -97,6 +215,11 @@ namespace SettingWiFi
             return cancelButton;
         }
 
+        private void CancelTextButtonClicked(object sender, ClickedEventArgs e)
+        {
+            ssidField.Text = string.Empty;
+        }
+
         private AlertDialog CreateOpenAPPageView(AP ap)
         {
             var infoView = CreateNewView(680, 100);
index 0dc04f6a6ac23397c0a9c08800c06568db875ae7..a5708afc7c53c47604bde8c5f08a6b6f9dac6d71 100644 (file)
Binary files a/packaging/org.tizen.cssetting-wifi-1.1.5.rpk and b/packaging/org.tizen.cssetting-wifi-1.1.5.rpk differ