优化部分交互逻辑
authorCaisking <3449750381@qq.com>
Tue, 16 Apr 2024 02:30:51 +0000 (10:30 +0800)
committerCaisking <3449750381@qq.com>
Tue, 16 Apr 2024 02:30:51 +0000 (10:30 +0800)
code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEnddataPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingSetPresenter.cpp
code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/message/message.bin

index 983459f..8a3a93a 100644 (file)
@@ -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 <iostream>
@@ -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;
     }
index 4adb8a5..a4214dc 100644 (file)
@@ -1,3 +1,9 @@
+/*** \r
+ * @Date: 2024-04-15 10:55:58\r
+ * @LastEditors: Caisking 3449750381@qq.com\r
+ * @LastEditTime: 2024-04-16 10:29:50\r
+ * @FilePath: /XTS_FD230/FD230/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingSetPresenter.cpp\r
+ */\r
 #include "AppViewIDs.h"\r
 #include "components/ui_label_ext.h"\r
 #include "language/font/ui_resource_string.h"\r
@@ -61,12 +67,11 @@ namespace OHOS
     {\r
         return true;\r
     }\r
-    \r
+\r
     bool TraingSetPresenter::OnDragEnd(UIView &view, const DragEvent &event)\r
     {\r
 \r
-        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT &&\r
-            (event.GetDeltaX() > 40) && (event.GetDeltaX() > (2 * MATH_ABS(event.GetDeltaY()))))\r
+        if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT)\r
         {\r
             // uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId();\r
             NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGNOMAL);\r
index 7bc9bc6..c3799e3 100644 (file)
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