+/***
+ * @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>
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;
}
+/*** \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
{\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