From 95dda9d0fb135d8a80b39fc692be4cff19137bdf Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Thu, 12 Mar 2026 15:35:25 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3=E6=81=AF=E5=B1=8F=E5=90=8E?= =?utf8?q?=E6=8C=89=E9=94=AE=E5=A4=B1=E6=95=88=E7=95=8C=E9=9D=A2=EF=BC=9A?= =?utf8?q?=201.=E6=89=8B=E8=A1=A8-=E5=AE=89=E8=A3=85=E8=A1=A8=E7=9B=98?= =?utf8?q?=E4=B9=8B=E5=90=8E=202.=E8=AE=A1=E7=AE=97=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../n9/nativeapp/nativeui/applist/include/ApplistView.h | 2 +- .../nativeui/calculator/include/CalculatorPresenter.h | 1 + .../nativeui/calculator/src/CalculatorPresenter.cpp | 6 ++++-- .../nativeui/heartrate/src/HeartChartPresenter.cpp | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/include/ApplistView.h b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/include/ApplistView.h index 8cd81944e..8aa3ff058 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/include/ApplistView.h +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/applist/include/ApplistView.h @@ -54,7 +54,7 @@ public: if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && (event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Applist Ondrag!!"); - NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN, TransitionType::TRANSITION_ZOOM); + NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN, TransitionType::TRANSITION_INVALID); } return false; diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/calculator/include/CalculatorPresenter.h b/code/sdk/application/wearable/n9/nativeapp/nativeui/calculator/include/CalculatorPresenter.h index 5cb691954..c648e6606 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/calculator/include/CalculatorPresenter.h +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/calculator/include/CalculatorPresenter.h @@ -27,6 +27,7 @@ public: ~CalculatorPresenter() override; void OnStart() override; + void OnResume(void) override; static CalculatorPresenter *GetInstance(void); diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/calculator/src/CalculatorPresenter.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/calculator/src/CalculatorPresenter.cpp index ec15f74de..c89061f17 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/calculator/src/CalculatorPresenter.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/calculator/src/CalculatorPresenter.cpp @@ -41,9 +41,11 @@ CalculatorPresenter *CalculatorPresenter::GetInstance(void) void CalculatorPresenter::OnStart() { - Presenter::OnStart(); } - +void CalculatorPresenter::OnResume(void) +{ + RootView::GetInstance()->SetOnKeyActListener(this); +} diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/heartrate/src/HeartChartPresenter.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/heartrate/src/HeartChartPresenter.cpp index 293959d92..a296af4a5 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/heartrate/src/HeartChartPresenter.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/heartrate/src/HeartChartPresenter.cpp @@ -72,6 +72,7 @@ namespace OHOS } void HeartChartPresenter::OnResume(void) { + RootView::GetInstance()->SetOnKeyActListener(this); } void HeartChartPresenter::OnStop(void) -- 2.17.1