解决#674,蓝牙搜索界面,优化重新搜索字样显示位置bug 1047/2
authorluozheng <1732036298@qq.com>
Sat, 28 Sep 2024 09:34:42 +0000 (17:34 +0800)
committerluozheng <1732036298@qq.com>
Sat, 28 Sep 2024 09:34:42 +0000 (17:34 +0800)
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothCaseListAdapter.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothDeviceListView.cpp
code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothEarListView.cpp

index 43b5246..313221d 100644 (file)
@@ -148,7 +148,7 @@ UIView *BluetoothCaseListAdapter::GetView(UIView *inView, int16_t index)
         return nullptr;
     }
     if ((static_cast<unsigned int>(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<BluetoothCaseInfo>::iterator node = bluetoothCaseList.begin();
index 17a2a38..263363c 100644 (file)
@@ -245,7 +245,7 @@ namespace OHOS
                 list->Resize(380, 200);\r
                 break;\r
             default:\r
-                list->Resize(380, 300);\r
+                list->Resize(380, 250);\r
                 break;\r
             }\r
             newEquipmentButton->SetY(list->GetY() + list->GetHeight() + 20);\r
index 9122a94..ef37e1b 100644 (file)
@@ -94,7 +94,7 @@ namespace OHOS
             // list->SetIntercept(true);\r
             list->SetDragACCLevel(5);\r
             list->SetSwipeACCLevel(800);\r
-            list->SetReboundSize(30);\r
+            // list->SetReboundSize(30);\r
             // list->SetScrollBlankSize(30);\r
             list->SetAdapter(adapterText);\r
             group->Add(list);\r
@@ -183,7 +183,7 @@ namespace OHOS
                 return;\r
             }\r
         }\r
-        rescanButton->SetPosition(173, list->GetY() + list->GetHeight() + 20, 120, 40);\r
+        rescanButton->SetPosition(173, 390, 120, 40);\r
         rescanButton->SetTextId(STR_BT_HEADSET_RESCAN); // 重新搜索\r
         rescanButton->SetViewId(BLUETOOTH_RESCAN_BUTTON);\r
         rescanButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff);\r
@@ -277,7 +277,7 @@ namespace OHOS
     // 刷新扫描出来的设备列表\r
     void BluetoothEarListView::RefreshBluetoothEarListView(void)\r
     {\r
-        if (list && rescanButton)\r
+        if (list)\r
         {\r
             switch (BluetoothModel::GetInstance()->GetCase().size())//根据扫描出的设备数量,设置扫描列表的高度,使其高度自适应\r
             {\r
@@ -291,13 +291,11 @@ namespace OHOS
                 list->Resize(380, 200);\r
                 break;\r
             default:\r
-                list->Resize(380, 300);\r
+                list->Resize(380, 250);\r
                 break;\r
             }\r
-            rescanButton->SetY(list->GetY() + list->GetHeight() + 20);\r
             list->RefreshList();\r
             list->Invalidate();\r
-            rescanButton->Invalidate();\r
         }\r
     }\r
 }
\ No newline at end of file