From: luozheng <1732036298@qq.com> Date: Sat, 27 Apr 2024 09:54:17 +0000 (+0800) Subject: 通过设置拦截函数优化连接状态视图的退出逻辑 X-Git-Tag: release_V1.2.70_20241020_135402~1123^2~13 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=931860ad59806c6bf8bf8e985ab4e80372d37dbd;p=mirrors%2FFD230.git 通过设置拦截函数优化连接状态视图的退出逻辑 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/main/src/ConnectedStatusView.cpp b/code/sdk/application/wearable/fd230app/nativeui/main/src/ConnectedStatusView.cpp index 96f44035d..4ea6fbdde 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/main/src/ConnectedStatusView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/main/src/ConnectedStatusView.cpp @@ -38,13 +38,13 @@ namespace OHOS for (int i = 0; i < MAX_CONNECTEDSTATUS_ID; i++) { delete background[i]; - background[i]; + background[i] = nullptr; delete PhoneAndEarAndBluetooth[i]; - PhoneAndEarAndBluetooth[i]; + PhoneAndEarAndBluetooth[i] = nullptr; delete ConnectedStatusLabel[i]; - ConnectedStatusLabel[i]; + ConnectedStatusLabel[i] = nullptr; } delete PhoneConnectedStatusImage; @@ -145,6 +145,9 @@ namespace OHOS } group->SetPosition(0, 0, 466, 466); group->SetViewIndex(1); + group->SetTouchable(true); + group->SetDraggable(true); + group->SetIntercept(true); /* -------------------------------------------------------------------------- */ LabelConfig titleConfig = {93, 53, 280, 35, 30, 35, "连接状态"}; Title = InitLabel(titleConfig);