From 029967bb4469b2808748e01554419349416595b2 Mon Sep 17 00:00:00 2001 From: Caisking Date: Thu, 8 May 2025 10:57:15 +0800 Subject: [PATCH] =?utf8?q?=E5=91=BC=E5=90=B8=E8=AE=AD=E7=BB=83=E5=A2=9E?= =?utf8?q?=E5=8A=A0=E6=BB=91=E5=8A=A8=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../respiratorytraining/src/RespiratoryTrainingPresenter.cpp | 2 +- .../respiratorytraining/src/RespiratoryTrainingView.cpp | 5 +++++ .../fd230/nativeapp/nativeui/sleep/src/SleepControlView.cpp | 4 +--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingPresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingPresenter.cpp index 26ba3227b..2238c303d 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingPresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingPresenter.cpp @@ -116,7 +116,7 @@ namespace OHOS bool RespiratoryTrainingPresenter::OnDragEnd(UIView &view, const DragEvent &event) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "RespiratoryTrainingPresenter::OnDragEnd"); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RespiratoryTrainingPresenter::OnDragEnd"); if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && RespiratoryTrainingPresenter::X_DRAG_FLAG) { std::string viewId = view.GetViewId(); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp index f3acf6be6..99a6a41ad 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/respiratorytraining/src/RespiratoryTrainingView.cpp @@ -572,6 +572,11 @@ namespace OHOS void RespiratoryTrainingView::OnStart() { + + RootView::GetInstance()->SetDraggable(true); + RootView::GetInstance()->SetTouchable(true); + RootView::GetInstance()->SetOnDragListener(presenter_); + RespiratoryTrainingViewInit(); } } \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/sleep/src/SleepControlView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/sleep/src/SleepControlView.cpp index b91c737d1..4836eaab6 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/sleep/src/SleepControlView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/sleep/src/SleepControlView.cpp @@ -100,9 +100,7 @@ namespace OHOS /*OnStart 增加界面控制*/ void SleepControlView::OnStart() { - View::OnStart(); - AddViewToRootContainer(new UIViewGroup()); - GetRootContainer()->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); + GetRootContainer()->SetTouchable(true); GetRootContainer()->SetDraggable(true); AddViewToRootContainer(GetSleepControlPageView()); -- 2.17.1