From ccf5f080a8f973775b53a7ad7dc4a703698e6a78 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sat, 11 Oct 2025 11:13:45 +0800 Subject: [PATCH] =?utf8?q?=E5=B1=8F=E8=94=BDapp=20list=E5=92=8C=E4=B8=BB?= =?utf8?q?=E7=95=8C=E9=9D=A2=E7=9A=84=E5=88=87=E6=8D=A2=E5=8A=A8=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../n9/nativeapp/nativeui/key/src/KeyInputListener.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/key/src/KeyInputListener.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/key/src/KeyInputListener.cpp index 85538519e..c7e6ec747 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/key/src/KeyInputListener.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/key/src/KeyInputListener.cpp @@ -35,7 +35,7 @@ void KeyInputListener::OnKeyPress(const KeyEvent &event) { pressFlag = 1; // 短按标志 WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "OnKeyPress: pressFlag = %d", pressFlag); - #if 0 + #if 1 uint16_t currentViewId = NativeAbility::GetInstance().GetCurSliceId(); uint16 keyID = event.GetKeyId(); if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) @@ -67,7 +67,7 @@ void KeyInputListener::OnKeyRelease(const KeyEvent& event) { if (longPressFlag == 0 && pressFlag == 1) { - HandlePowerKeyPress(currentViewId); + // HandlePowerKeyPress(currentViewId); } } // 重置标志 @@ -85,7 +85,7 @@ void KeyInputListener::HandlePowerKeyPress(uint16_t currentViewId) { if (mcu_pms_is_screen_on()) { - NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN,TransitionType::TRANSITION_ZOOM); + NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN,TransitionType::TRANSITION_INVALID); } } else // 当前页面是主表盘 @@ -109,9 +109,9 @@ void KeyInputListener::HandlePowerKeyPress(uint16_t currentViewId) else { if (ApplistModel::GetInstance().GetCurrentStyle() == AppListStyle::WATERFALL_STYLE) { - NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_ENTER_WATERFALL); + NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_INVALID); } else { - NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_ZOOM); + NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST, TransitionType::TRANSITION_INVALID); } } } -- 2.17.1