From: luozheng <1732036298@qq.com> Date: Sat, 28 Sep 2024 09:34:42 +0000 (+0800) Subject: 解决#674,蓝牙搜索界面,优化重新搜索字样显示位置bug X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F1047%2F2;p=mirrors%2FFD230.git 解决#674,蓝牙搜索界面,优化重新搜索字样显示位置bug --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothCaseListAdapter.cpp b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothCaseListAdapter.cpp index 43b524601..313221db6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothCaseListAdapter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothCaseListAdapter.cpp @@ -148,7 +148,7 @@ UIView *BluetoothCaseListAdapter::GetView(UIView *inView, int16_t index) return nullptr; } if ((static_cast(index) > bluetoothCaseList.size() - 1) || (index < 0)) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BluetoothCaseListAdapter::GetView %d %d", index, bluetoothCaseList.size()); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "BluetoothCaseListAdapter::GetView %d %d", index, bluetoothCaseList.size()); return nullptr; } std::list::iterator node = bluetoothCaseList.begin(); diff --git a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothDeviceListView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothDeviceListView.cpp index 17a2a381b..263363c7b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothDeviceListView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothDeviceListView.cpp @@ -245,7 +245,7 @@ namespace OHOS list->Resize(380, 200); break; default: - list->Resize(380, 300); + list->Resize(380, 250); break; } newEquipmentButton->SetY(list->GetY() + list->GetHeight() + 20); diff --git a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothEarListView.cpp b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothEarListView.cpp index 9122a94ed..ef37e1b3a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothEarListView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothEarListView.cpp @@ -94,7 +94,7 @@ namespace OHOS // list->SetIntercept(true); list->SetDragACCLevel(5); list->SetSwipeACCLevel(800); - list->SetReboundSize(30); + // list->SetReboundSize(30); // list->SetScrollBlankSize(30); list->SetAdapter(adapterText); group->Add(list); @@ -183,7 +183,7 @@ namespace OHOS return; } } - rescanButton->SetPosition(173, list->GetY() + list->GetHeight() + 20, 120, 40); + rescanButton->SetPosition(173, 390, 120, 40); rescanButton->SetTextId(STR_BT_HEADSET_RESCAN); // 重新搜索 rescanButton->SetViewId(BLUETOOTH_RESCAN_BUTTON); rescanButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff); @@ -277,7 +277,7 @@ namespace OHOS // 刷新扫描出来的设备列表 void BluetoothEarListView::RefreshBluetoothEarListView(void) { - if (list && rescanButton) + if (list) { switch (BluetoothModel::GetInstance()->GetCase().size())//根据扫描出的设备数量,设置扫描列表的高度,使其高度自适应 { @@ -291,13 +291,11 @@ namespace OHOS list->Resize(380, 200); break; default: - list->Resize(380, 300); + list->Resize(380, 250); break; } - rescanButton->SetY(list->GetY() + list->GetHeight() + 20); list->RefreshList(); list->Invalidate(); - rescanButton->Invalidate(); } } } \ No newline at end of file