From 9caeeefad447ac09a24c97d69f9097119335f75b Mon Sep 17 00:00:00 2001 From: Caisking Date: Fri, 29 Aug 2025 11:43:04 +0800 Subject: [PATCH] =?utf8?q?=E5=85=B3=E9=97=AD=E4=B8=BB=E7=95=8C=E9=9D=A2?= =?utf8?q?=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeapp/nativeui/main/src/MainModel.cpp | 2 +- .../nativeui/main/src/MainViewSample.cpp | 42 ++++++++----------- 2 files changed, 18 insertions(+), 26 deletions(-) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainModel.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainModel.cpp index 138d5f546..3d79a040a 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainModel.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainModel.cpp @@ -582,7 +582,7 @@ namespace OHOS } else { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "Error: Second value is empty. Initializing to default settings.\r\n"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Error: Second value is empty. Initializing to default settings.\r\n"); #if defined(BOARD_W9) InitDialSettingDefault(DIAL_CLOCK);//W9使用默认静态表盘 #else diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainViewSample.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainViewSample.cpp index edab4f5d8..5673c08c1 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainViewSample.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/main/src/MainViewSample.cpp @@ -160,18 +160,18 @@ namespace OHOS delete setmainView; setmainView = nullptr; } - // if (sleepView != nullptr) - // { - // sleepView->RemoveAll(); - // delete sleepView; - // sleepView = nullptr; - // } - // if (traingView != nullptr) - // { - // traingView->RemoveAll(); - // delete traingView; - // traingView = nullptr; - // } + if (sleepView != nullptr) + { + sleepView->RemoveAll(); + delete sleepView; + sleepView = nullptr; + } + if (traingView != nullptr) + { + traingView->RemoveAll(); + delete traingView; + traingView = nullptr; + } if (weatherControlView != nullptr) { delete weatherControlView; @@ -183,11 +183,6 @@ namespace OHOS delete GoalControlView; GoalControlView = nullptr; } - // if (applistCardView != nullptr) - // { - // delete applistCardView; - // applistCardView = nullptr; - // } if (mainSwipeGroup != nullptr) { delete mainSwipeGroup; @@ -227,7 +222,7 @@ namespace OHOS void MainViewSample::OnStart() { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnStart"); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::OnStart"); if (mainSwipeGroup == nullptr) { mainSwipeGroup = new UICrossView(); @@ -352,14 +347,14 @@ namespace OHOS { if (cardSettings[i] == CardMapper[j].id) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainViewSample:: recordCard[%d]", j); + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample:: recordCard[%d]", j); recordCard[j] = (this->*(CardMapper[j].func))(); if (recordCard[j] == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainViewSample:: recordCard %d error", j); return false; } - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample:: recordCard[%d]:%p", j, recordCard[j]); break; } @@ -383,7 +378,7 @@ namespace OHOS if (recordCard[cardId] != nullptr) { mainSwipeGroup->HorAdd(recordCard[cardId]); - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainViewSample:: HorViewLoad cardid = %d ViewIndex = %d", + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample:: HorViewLoad cardid = %d ViewIndex = %d", cardId, recordCard[cardId]->GetViewIndex()); } else @@ -397,8 +392,7 @@ namespace OHOS void MainViewSample::VerticalViewInit(void) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::VerticalViewInit"); -#ifdef FD230 + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "MainViewSample::VerticalViewInit") if (dropDownView == nullptr) { dropDownView = new PullUpDownView(); if (dropDownView == nullptr) @@ -426,8 +420,6 @@ namespace OHOS messageView->PreLoad(); messageView->SetDraggable(false); // messageView->SetIntercept(true); - messageView->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT); -#endif } PullUpDownView *MainViewSample::GetPullUpView() -- 2.17.1