From: Caisking <3449750381@qq.com> Date: Tue, 16 Apr 2024 02:30:51 +0000 (+0800) Subject: 优化部分交互逻辑 X-Git-Tag: release_V1.2.70_20241020_135402~1175^2~7 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=0085745586f089db84febcf12b6bfca04464c144;p=mirrors%2FFD230.git 优化部分交互逻辑 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEnddataPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEnddataPresenter.cpp index 983459fbc..8a3a93ac8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEnddataPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEnddataPresenter.cpp @@ -1,6 +1,12 @@ +/*** + * @Date: 2024-04-15 14:19:47 + * @LastEditors: Caisking 3449750381@qq.com + * @LastEditTime: 2024-04-16 10:29:09 + * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEnddataPresenter.cpp + */ #include "AppViewIDs.h" #include "components/ui_label_ext.h" -#include"language/font/ui_resource_string.h" +#include "language/font/ui_resource_string.h" #include "NativeAbility.h" #include @@ -59,11 +65,10 @@ namespace OHOS bool TraingEnddataPresenter::OnDrag(UIView &view, const DragEvent &event) { - - // if (event.GetDragDirection() == DragEvent::DIRECTION_TOP_TO_BOTTOM) - // { - // NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGDATA); - // } + if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) + { + NativeAbility::GetInstance().ChangeSlice(VIEW_TRAINING); + } UNUSED(view); return true; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingSetPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingSetPresenter.cpp index 4adb8a570..a4214dccf 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingSetPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingSetPresenter.cpp @@ -1,3 +1,9 @@ +/*** + * @Date: 2024-04-15 10:55:58 + * @LastEditors: Caisking 3449750381@qq.com + * @LastEditTime: 2024-04-16 10:29:50 + * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingSetPresenter.cpp + */ #include "AppViewIDs.h" #include "components/ui_label_ext.h" #include "language/font/ui_resource_string.h" @@ -61,12 +67,11 @@ namespace OHOS { return true; } - + bool TraingSetPresenter::OnDragEnd(UIView &view, const DragEvent &event) { - if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && - (event.GetDeltaX() > 40) && (event.GetDeltaX() > (2 * MATH_ABS(event.GetDeltaY())))) + if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) { // uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId(); NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGNOMAL); diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/message/message.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/message/message.bin index 7bc9bc605..c3799e3f9 100644 Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/message/message.bin and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/message/message.bin differ