From: Anuj Kumar Singh Date: Mon, 25 Sep 2023 04:01:44 +0000 (+0530) Subject: Resolve Details of device device name: missing rename input, missing Use for info X-Git-Tag: accepted/tizen/unified/20231004.100210~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=610d07f629412c2d18c4416b31c15ace4fc627d3;p=profile%2Fiot%2Fapps%2Fdotnet%2Fsetting-bluetooth.git Resolve Details of device device name: missing rename input, missing Use for info This Patch: - Resolves https://code.sec.samsung.net/jira/browse/TEIGHT-5172 Change-Id: I0fbacb1006c72547160dfd0246cb1601432efa48 Signed-off-by: Anuj Kumar Singh --- diff --git a/SettingBluetooth/SettingBluetooth/View/BtDetailView.cs b/SettingBluetooth/SettingBluetooth/View/BtDetailView.cs index 68cc7a2..104b173 100644 --- a/SettingBluetooth/SettingBluetooth/View/BtDetailView.cs +++ b/SettingBluetooth/SettingBluetooth/View/BtDetailView.cs @@ -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 diff --git a/SettingBluetooth/SettingBluetooth/View/Resources.cs b/SettingBluetooth/SettingBluetooth/View/Resources.cs index 33ee397..66e6579 100644 --- a/SettingBluetooth/SettingBluetooth/View/Resources.cs +++ b/SettingBluetooth/SettingBluetooth/View/Resources.cs @@ -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"; diff --git a/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk b/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk index fd01610..9cf047f 100644 Binary files a/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk and b/packaging/org.tizen.cssetting-bluetooth-1.0.0.rpk differ