Resolve Details of device device name: missing rename input, missing Use for info 77/299277/2
authorAnuj Kumar Singh <anujk.singh@samsung.com>
Mon, 25 Sep 2023 04:01:44 +0000 (09:31 +0530)
committerAnuj Kumar Singh <anujk.singh@samsung.com>
Mon, 25 Sep 2023 06:16:17 +0000 (11:46 +0530)
This Patch:
 - Resolves https://code.sec.samsung.net/jira/browse/TEIGHT-5172

Change-Id: I0fbacb1006c72547160dfd0246cb1601432efa48
Signed-off-by: Anuj Kumar Singh <anujk.singh@samsung.com>
SettingBluetooth/SettingBluetooth/View/BtDetailView.cs
SettingBluetooth/SettingBluetooth/View/Resources.cs
packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk

index 68cc7a29a53c4f2b4c78386a292cbbdf7501cd89..104b1735bd939833257776e1efc532c8054a204a 100644 (file)
@@ -13,6 +13,7 @@ namespace SettingBluetooth
         static View mDetailView;
         static ContentPage mDetailPage;
         static Device mDevice;
+        private static ScrollableBase mScrollableInfo;
         private static TextField mDeviceNameField;
         private static readonly Color underlineColor = new Color("#FF6200");
 
@@ -31,6 +32,19 @@ namespace SettingBluetooth
                 HeightSpecification = LayoutParamPolicies.MatchParent,
             };
 
+            mScrollableInfo = new ScrollableBase()
+            {
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                HeightSpecification = LayoutParamPolicies.MatchParent,
+                ScrollingDirection = ScrollableBase.Direction.Vertical,
+                HideScrollbar = false,
+                Layout = new LinearLayout()
+                {
+                    LinearOrientation = LinearLayout.Orientation.Vertical,
+                },
+
+            };
+
             CreateDeviceNameView(device.Name);
 
             var unpairButton = new DefaultLinearItem()
@@ -45,39 +59,21 @@ namespace SettingBluetooth
             };
             mDetailView.Add(unpairButton);
 
-            var connOption = new DefaultLinearItem()
+            var useForHeader = new DefaultLinearItem()
             {
                 WidthSpecification = LayoutParamPolicies.MatchParent,
-                Text = Resources.IDS_BT_BODY_CONNECTION_OPTIONS,
+                Text = Resources.IDS_BT_BODY_USE_FOR,
+                Margin = new Extents(8, 0, 0, 0).SpToPx(),
             };
-            mDetailView.Add(connOption);
+            useForHeader.Label.TextColor = Color.Grey;
+            mDetailView.Add(useForHeader);
 
             if (device.BtDevice.IsA2dpSupported)
             {
-                var mediaAudioItem = new DefaultLinearItem()
-                {
-                    WidthSpecification = LayoutParamPolicies.MatchParent,
-                    Text = Resources.IDS_BT_BODY_MEDIA_AUDIO,
-                };
-                var mediaAudioSwitch = new Switch()
-                {
-                    IsSelected = device.BtDevice.IsA2dpConnected ? true : false,
-                };
-                mediaAudioSwitch.SelectedChanged += (obj, ev) =>
-                {
-                    if (ev.IsSelected)
-                    {
-                        DeviceController.ConnectA2dp(device.BtDevice);
-                    }
-                    else
-                    {
-                        DeviceController.DisconnectA2dp(device.BtDevice, false);
-                    }
-                };
-                mediaAudioItem.Extra = mediaAudioSwitch;
-                mDetailView.Add(mediaAudioItem);
+                CreateMediaAudio();
             }
 
+            mDetailView.Add(mScrollableInfo);
             mDetailPage = new ContentPage()
             {
                 AppBar = CreateAppBar(),
@@ -87,6 +83,32 @@ namespace SettingBluetooth
             window.GetDefaultNavigator().Push(mDetailPage);
         }
 
+        private static void CreateMediaAudio()
+        {
+            var mediaAudioItem = new DefaultLinearItem()
+            {
+                WidthSpecification = LayoutParamPolicies.MatchParent,
+                Text = Resources.IDS_BT_BODY_MEDIA_AUDIO,
+            };
+            var mediaAudioSwitch = new Switch()
+            {
+                IsSelected = mDevice.BtDevice.IsA2dpConnected ? true : false,
+            };
+            mediaAudioSwitch.SelectedChanged += (obj, ev) =>
+            {
+                if (ev.IsSelected)
+                {
+                    DeviceController.ConnectA2dp(mDevice.BtDevice);
+                }
+                else
+                {
+                    DeviceController.DisconnectA2dp(mDevice.BtDevice, false);
+                }
+            };
+            mediaAudioItem.Extra = mediaAudioSwitch;
+            mScrollableInfo.Add(mediaAudioItem);
+        }
+
         private static void CreateDeviceNameView(string deviceName)
         {
             var label = new TextLabel
index 33ee397b2a6dd2fdf5fec247c57831eab9b309ef..66e6579edafec7531f6d043f12d1b627fd4ccbd0 100644 (file)
@@ -33,7 +33,7 @@ namespace SettingBluetooth
         static public string IDS_BT_BODY_DETAILS = "Details";
         static public string IDS_BT_BODY_DEVICENAME = "Device name";
         static public string IDS_BT_OPT_UNPAIR = "Unpair";
-        static public string IDS_BT_BODY_CONNECTION_OPTIONS = "Connection options";
+        static public string IDS_BT_BODY_USE_FOR = "Use for";
         static public string IDS_BT_BODY_MEDIA_AUDIO = "Media audio";
         static public string IDS_BT_SK_DISCONNECT = "Disconnect";
         static public string IDS_BT_HEADER_DISCONNECT_DEVICE_ABB = "Disconnect device";
index fd01610b8f3724a5adb08385ab6e7fb3f83c1ab9..9cf047f76dd204d14558e6e07a1e20367a3cd68c 100644 (file)
Binary files a/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk and b/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk differ