From 7d5e2ad0527611c785c45247ee0014cea80d409c Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 28 Sep 2024 17:34:42 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3#674=EF=BC=8C=E8=93=9D?= =?utf8?q?=E7=89=99=E6=90=9C=E7=B4=A2=E7=95=8C=E9=9D=A2=EF=BC=8C=E4=BC=98?= =?utf8?q?=E5=8C=96=E9=87=8D=E6=96=B0=E6=90=9C=E7=B4=A2=E5=AD=97=E6=A0=B7?= =?utf8?q?=E6=98=BE=E7=A4=BA=E4=BD=8D=E7=BD=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../bluetooth/src/BluetoothCaseListAdapter.cpp | 2 +- .../nativeui/bluetooth/src/BluetoothDeviceListView.cpp | 2 +- .../nativeui/bluetooth/src/BluetoothEarListView.cpp | 10 ++++------ 3 files changed, 6 insertions(+), 8 deletions(-) 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 -- 2.17.1