训练结束弹窗Slice删除
authorCaisking <3449750381@qq.com>
Fri, 12 Apr 2024 10:38:13 +0000 (18:38 +0800)
committerCaisking <3449750381@qq.com>
Fri, 12 Apr 2024 10:38:13 +0000 (18:38 +0800)
13 files changed:
code/sdk/application/wearable/fd230app/CMakeLists.txt
code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h
code/sdk/application/wearable/fd230app/nativelauncher/include/NativeLauncher.h
code/sdk/application/wearable/fd230app/nativelauncher/src/NativeLauncher.cpp
code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnote2Presenter.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnote2View.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnotePresenter.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnoteView.h [deleted file]
code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnote2Presenter.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnote2View.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnotePresenter.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnoteView.cpp [deleted file]
code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TraingCardPresenter.cpp

index 6bcb1e1..909aea2 100644 (file)
@@ -479,10 +479,6 @@ set(SOURCES
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingSetTimePresenter.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingSetCaluliView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingSetCaluliPresenter.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingEndnoteView.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingEndnotePresenter.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingEndnote2View.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingEndnote2Presenter.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingEnddataView.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingEnddataPresenter.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/nativeui/traing/src/TraingWinView.cpp
index f3c6a7b..f9630e6 100644 (file)
@@ -80,8 +80,6 @@ typedef enum : uint16_t
     VIEW_TRAININGSETDIST,   // 设置训练路程
     VIEW_TRAININGSETSTEP,   // 设置训练步数
     VIEW_TRAININGCRAD,      // 训练控制卡片
-    VIEW_TRAININGENDNOTE,   // 结束训练提醒
-    VIEW_TRAININGENDNOTE2,  // 结束训练时间太短
     VIEW_TRAININGENDDATA,   // 训练结束详细数据
     VIEW_TRAININGSTRONG,    // 训练强度介绍
     VIEW_TRAININGWIN,       // 目标达成
index 3062b8e..f0bb3a8 100644 (file)
@@ -74,8 +74,6 @@ namespace OHOS
         void InitTraingSetDistSlice(void);
         void InitTraingSetStepSlice(void);
         void InitTraingCardSlice(void);
-        void InitTraingEndnoteSlice(void);
-        void InitTraingEndnote2Slice(void);
         void InitTraingEnddataSlice(void);
         void InitTraingWinSlice(void);
 
index bc4002d..1643855 100644 (file)
 #include "traing/include/TraingSetDistView.h"
 #include "traing/include/TraingSetSeptPresenter.h"
 #include "traing/include/TraingSetSeptView.h"
-#include "traing/include/TraingEndnotePresenter.h"
-#include "traing/include/TraingEndnoteView.h"
-#include "traing/include/TraingEndnote2Presenter.h"
-#include "traing/include/TraingEndnote2View.h"
 #include "traing/include/TraingEnddataPresenter.h"
 #include "traing/include/TraingEnddataView.h"
 #include "traing/include/TraingStrongPresenter.h"
@@ -313,8 +309,6 @@ namespace OHOS
         {VIEW_TRAININGSETDIST, &NativeLauncher::InitTraingSetDistSlice},     // 设置目标距离
         {VIEW_TRAININGSETSTEP, &NativeLauncher::InitTraingSetStepSlice},     // 设置目标步数
         {VIEW_TRAININGCRAD, &NativeLauncher::InitTraingCardSlice},           // 训练卡片
-        {VIEW_TRAININGENDNOTE, &NativeLauncher::InitTraingEndnoteSlice},     // 训练结束提醒
-        {VIEW_TRAININGENDNOTE2, &NativeLauncher::InitTraingEndnote2Slice},   // 训练结束时间太短提醒
         {VIEW_TRAININGENDDATA, &NativeLauncher::InitTraingEnddataSlice},     // 训练结束详细数据
         {VIEW_TRAININGWIN, &NativeLauncher::InitTraingWinSlice},             // 训练目标达成
         {VIEW_TRAINING_RECORD, &NativeLauncher::InitTraingRecordSlice},      // 训练目标达成
@@ -954,16 +948,6 @@ namespace OHOS
         NativeAbility::GetInstance().AddSliceProxy(VIEW_TRAININGCRAD, traingcardview);
     }
 
-    void NativeLauncher::InitTraingEndnoteSlice(void)
-    {
-        SliceProxy *traingendnoteview = new AbilitySliceProxy<TraingEndnoteView, TraingEndnotePresenter>;
-        NativeAbility::GetInstance().AddSliceProxy(VIEW_TRAININGENDNOTE, traingendnoteview);
-    }
-    void NativeLauncher::InitTraingEndnote2Slice(void)
-    {
-        SliceProxy *traingendnote2view = new AbilitySliceProxy<TraingEndnote2View, TraingEndnote2Presenter>;
-        NativeAbility::GetInstance().AddSliceProxy(VIEW_TRAININGENDNOTE2, traingendnote2view);
-    }
     void NativeLauncher::InitTraingEnddataSlice(void)
     {
         SliceProxy *traingenddataview = new AbilitySliceProxy<TraingEnddataView, TraingEnddataPresenter>;
diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnote2Presenter.h b/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnote2Presenter.h
deleted file mode 100644 (file)
index a2e64be..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef _TraingEndnote2_PRESENTER_H
-#define _TraingEndnote2_PRESENTER_H
-
-#include "Presenter.h"
-#include "TraingEndnote2View.h"
-
-namespace OHOS
-{
-    class TraingEndnote2View;
-
-    class TraingEndnote2Presenter : public Presenter<TraingEndnote2View>,
-                                public UIView::OnClickListener,
-                                public UIView::OnDragListener
-    {
-    public:
-        TraingEndnote2Presenter();
-        virtual ~TraingEndnote2Presenter();
-
-        void OnStart() override;
-        void OnPause() override;
-        void OnResume() override;
-        void OnStop() override;
-        static TraingEndnote2Presenter *GetInstance();
-
-    private:
-        // 因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;
-        bool OnClick(UIView &view, const ClickEvent &event) override;
-        bool OnDrag(UIView &view, const DragEvent &event) override;
-       // bool OnDragEnd(UIView& view, const DragEvent& event) override;
-    };
-} // namespace OHOS
-
-#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnote2View.h b/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnote2View.h
deleted file mode 100644 (file)
index 49108ce..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef _TraingEndnote2_VIEW_H
-#define _TraingEndnote2_VIEW_H
-
-#include "BaseView.h"
-#include "View.h"
-#include <ui_scroll_view.h>
-#include "components/ui_view_group.h"
-#include "components/ui_label.h"
-#include "components/ui_label_ext.h"
-#include "components/ui_image_view.h"
-#include "components/ui_button.h"
-#include "components/ui_image_animator.h"
-#include "components/ui_label_button_ext.h"
-#include "components/ui_chart.h"
-#include "components/ui_list.h"
-#include "components/icon_adapter.h"
-#include "wearable_log.h"
-#include "ohos_types.h"
-#include "components/ui_card_page.h"
-#include "traing/include/TraingModel.h"
-#include "traing/Training_UiConfig.h"
-
-#include "traing/include/TraingModel.h"
-#include "traing/Training_UiConfig.h"
-#include "TraingEndnote2Presenter.h"
-namespace OHOS
-{
-#define BUTTONNO "button1"
-#define BUTTONYES "button2"
-
-    class TraingEndnote2Presenter;
-    class TraingEndnote2View : public View<TraingEndnote2Presenter>
-    {
-
-    public:
-        TraingEndnote2View();
-        virtual ~TraingEndnote2View();
-        static TraingEndnote2View *GetInstance(void);
-
-        void OnStart() override;
-        void OnSetUpView() override;
-        void OnTearDownView() override;
-        void OnStop() override;
-        void InitView();
-        void DeInit();
-      
-        void PreLoad(void);
-
-        // 通过函数改变
-        void SetLabel();
-        void SetButton();
-
-    private:
-        UIView::OnDragListener *draglistener{nullptr};
-        TraingEndnote2View(TraingEndnote2View &&) = delete;
-        TraingEndnote2View &operator=(TraingEndnote2View &&) = delete;
-
-        UIViewGroup *container_ = nullptr;
-
-        UILabelExt *label1_ = nullptr;
-        UILabelExt *label2_ = nullptr;
-
-        UIButton *button1_ = nullptr;
-        UIButton *button2_ = nullptr;
-        bool viewiInitStatus{false};
-    };
-} // namespace OHOS
-#endif // TraingEndnote2_PRESENTER_H
diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnotePresenter.h b/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnotePresenter.h
deleted file mode 100644 (file)
index 219e397..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-
-#ifndef _TraingEndnote_PRESENTER_H
-#define _TraingEndnote_PRESENTER_H
-
-#include "Presenter.h"
-#include "TraingEndnoteView.h"
-
-namespace OHOS
-{
-    class TraingEndnoteView;
-
-    class TraingEndnotePresenter : public Presenter<TraingEndnoteView>,
-                                public UIView::OnClickListener,
-                                public UIView::OnDragListener
-    {
-    public:
-        TraingEndnotePresenter();
-        virtual ~TraingEndnotePresenter();
-
-        void OnStart() override;
-        void OnPause() override;
-        void OnResume() override;
-        void OnStop() override;
-        static TraingEndnotePresenter *GetInstance();
-
-    private:
-        // 因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承;
-        bool OnClick(UIView &view, const ClickEvent &event) override;
-        bool OnDrag(UIView &view, const DragEvent &event) override;
-        //bool OnDragEnd(UIView& view, const DragEvent& event) override;
-    };
-} // namespace OHOS
-
-#endif // SLEEPDETAIL_PRESENTER_H
\ No newline at end of file
diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnoteView.h b/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingEndnoteView.h
deleted file mode 100644 (file)
index c8cc0cf..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-#ifndef _TraingEndnote_VIEW_H
-#define _TraingEndnote_VIEW_H
-
-#include "BaseView.h"
-#include "View.h"
-#include <ui_scroll_view.h>
-#include "components/ui_view_group.h"
-#include "components/ui_label.h"
-#include "components/ui_label_ext.h"
-#include "components/ui_image_view.h"
-#include "components/ui_button.h"
-#include "components/ui_image_animator.h"
-#include "components/ui_label_button_ext.h"
-#include "components/ui_chart.h"
-#include "components/ui_list.h"
-#include "components/icon_adapter.h"
-#include "wearable_log.h"
-#include "ohos_types.h"
-#include "components/ui_card_page.h"
-#include "traing/include/TraingModel.h"
-#include "traing/Training_UiConfig.h"
-
-#include "traing/include/TraingModel.h"
-#include "traing/Training_UiConfig.h"
-#include "TraingEndnotePresenter.h"
-namespace OHOS
-{
-#define BUTTONNO "button1"
-#define BUTTONYES "button2"
-
-    class TraingEndnotePresenter;
-    class TraingEndnoteView : public View<TraingEndnotePresenter>
-    {
-
-    public:
-        TraingEndnoteView();
-        virtual ~TraingEndnoteView();
-        static TraingEndnoteView *GetInstance(void);
-
-        void OnStart() override;
-        void OnSetUpView() override;
-        void OnTearDownView() override;
-        void OnStop() override;
-        void InitView();
-        void DeInit();
-       
-        void InitList();
-        void PreLoad(void);
-
-        // 通过函数改变
-        void SetLabel();
-        void SetButton();
-
-    private:
-        UIView::OnDragListener *draglistener{nullptr};
-        TraingEndnoteView(TraingEndnoteView &&) = delete;
-        TraingEndnoteView &operator=(TraingEndnoteView &&) = delete;
-
-        UIViewGroup *container_ = nullptr;
-
-        UILabelExt *label1_ = nullptr;
-        UILabelExt *label2_ = nullptr;
-
-        UIButton *button1_ = nullptr;
-        UIButton *button2_ = nullptr;
-        bool viewiInitStatus{false};
-    };
-} // namespace OHOS
-#endif // TraingEndnote_PRESENTER_H
diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnote2Presenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnote2Presenter.cpp
deleted file mode 100644 (file)
index 79a6f90..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
-#include "language/font/ui_resource_string.h"
-#include "NativeAbility.h"
-
-#include <iostream>
-#include <chrono>
-#include <thread>
-#include "traing/include/TraingEndnote2Presenter.h"
-// #include "TraingEndnote2View.h"
-
-namespace OHOS
-{
-
-    // 当前Presenter属性实例化的内存指针
-    static TraingEndnote2Presenter *g_pTraingEndnote2Presenter = nullptr;
-
-    TraingEndnote2Presenter::TraingEndnote2Presenter()
-    {
-
-        g_pTraingEndnote2Presenter = this;
-    }
-
-    TraingEndnote2Presenter::~TraingEndnote2Presenter()
-    {
-
-        g_pTraingEndnote2Presenter = nullptr;
-    }
-
-    TraingEndnote2Presenter *TraingEndnote2Presenter::GetInstance()
-    {
-
-        return g_pTraingEndnote2Presenter;
-    }
-
-    void TraingEndnote2Presenter::OnStart()
-    {
-
-        Presenter<TraingEndnote2View>::OnStart();
-    }
-
-    void TraingEndnote2Presenter::OnPause(void)
-    {
-
-        Presenter<TraingEndnote2View>::OnPause();
-    }
-
-    void TraingEndnote2Presenter::OnResume(void)
-    {
-
-        Presenter<TraingEndnote2View>::OnResume();
-    }
-
-    void TraingEndnote2Presenter::OnStop(void)
-    {
-
-        Presenter<TraingEndnote2View>::OnStop();
-    }
-
-    bool TraingEndnote2Presenter::OnDrag(UIView &view, const DragEvent &event)
-    {
-
-        // if (event.GetDragDirection() == DragEvent::DIRECTION_TOP_TO_BOTTOM)
-        // {
-        //     NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGDATA);
-        // }
-        UNUSED(view);
-        return true;
-    }
-
-    bool TraingEndnote2Presenter::OnClick(UIView &view, const ClickEvent &event)
-    {
-
-        // 根据控件id查找是哪个控件触发了点击回调
-        if (strcmp(view.GetViewId(), BUTTONNO) == 0)
-        {
-           // NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGCONTROL);
-        }
-        if (strcmp(view.GetViewId(), BUTTONYES) == 0)
-        {
-            NativeAbility::GetInstance().ChangeSlice(VIEW_TRAINING);
-        }
-        return true;
-    }
-}
diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnote2View.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnote2View.cpp
deleted file mode 100644 (file)
index 635a0cf..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-
-#include "traing/include/TraingEndnote2View.h"
-
-#include "common/image_cache_manager.h"
-#include "components/ui_label_ext.h"
-#include "language/font/ui_resource_string.h"
-#include "UiConfig.h"
-#include "ui_resource_image.h"
-#include <ui_scroll_view.h>
-#include "components/ui_button.h"
-#include "traing/include/TraingModel.h"
-#include "traing/Training_UiConfig.h"
-
-namespace OHOS
-{
-
-    static TraingEndnote2View *g_pTraingEndnote2View{nullptr};
-
-    TraingEndnote2View::TraingEndnote2View()
-    {
-        g_pTraingEndnote2View = this;
-    }
-
-    TraingEndnote2View::~TraingEndnote2View()
-    {
-        DeInit();
-        g_pTraingEndnote2View = nullptr;
-    }
-
-    TraingEndnote2View *TraingEndnote2View::GetInstance()
-    {
-
-        return g_pTraingEndnote2View;
-    }
-
-    /* InitView:初始化界面*/
-    void TraingEndnote2View ::InitView()
-    {
-        if (container_ == nullptr)
-        {
-            container_ = new UIViewGroup();
-            container_->SetPosition(0, 0, 466, 466);
-            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);
-        }
-
-        // 初始化Lable
-        TraingModel::GetInstance()->InitLabel(label1_, 203, 52, 90, 35, "label1", "注意", DEFAULT_VECTOR_FONT_FILENAME, 30);
-        TraingModel::GetInstance()->InitLabel(label2_, 56, 167, 60, 40, "label2", "当前运动量太小,无法记录\n是否结束运动", DEFAULT_VECTOR_FONT_FILENAME, 30);
-
-        container_->Add(label1_);
-        container_->Add(label2_);
-
-        TraingModel::GetInstance()->InitButton(button1_, 111, 299, 100, 100, BUTTONNO);
-        button1_->SetOnClickListener(static_cast<UIView::OnClickListener *>(TraingEndnote2Presenter::GetInstance()));
-        // Set additional property
-        button1_->SetImageSrc(NO_IMAGE, NO_IMAGE);
-
-        TraingModel::GetInstance()->InitButton(button2_, 256, 299, 100, 100, BUTTONYES);
-        button2_->SetOnClickListener(static_cast<UIView::OnClickListener *>(TraingEndnote2Presenter::GetInstance()));
-        // Set additional property
-        button2_->SetImageSrc(YES_IMAGE, YES_IMAGE);
-
-        container_->Add(button1_);
-        container_->Add(button2_);
-    }
-
-    /* DeInit:删除组件 */
-    void TraingEndnote2View::DeInit()
-    {
-        container_->RemoveAll();
-        UIView *view = static_cast<UIViewGroup *>(container_)->GetChildrenHead();
-        while (view != nullptr)
-        {
-            UIView *tempView = view;
-            view = view->GetNextSibling();
-            if (tempView->GetParent())
-            {
-                static_cast<UIViewGroup *>(tempView->GetParent())->Remove(tempView);
-            }
-            delete tempView;
-        }
-        delete container_;
-        container_ = nullptr;
-    }
-
-    void TraingEndnote2View::PreLoad(void)
-    {
-        if (!viewiInitStatus)
-        {
-            InitView();
-            viewiInitStatus = true;
-        }
-    }
-    void TraingEndnote2View::OnStart()
-    {
-        container_ = new UIViewGroup();
-        if (container_ == nullptr)
-        {
-            return;
-        }
-        container_->SetPosition(0, 0);
-        container_->SetWidth(Screen::GetInstance().GetWidth());
-        container_->SetHeight(Screen::GetInstance().GetHeight());
-
-        // 创建 draglistener 实例并设置为拖动监听器
-        UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(TraingEndnote2Presenter::GetInstance());
-        if (draglistener == nullptr)
-        {
-            return;
-        }
-        container_->SetOnDragListener(draglistener);
-
-        container_->SetTouchable(true);
-        container_->SetDraggable(true);
-
-        PreLoad();
-        RootView::GetInstance()->Add(container_);
-    }
-
-    void TraingEndnote2View::OnSetUpView()
-    {
-
-        View<TraingEndnote2Presenter>::OnSetUpView();
-        Draw();
-    }
-
-    void TraingEndnote2View::OnTearDownView()
-    {
-
-        View<TraingEndnote2Presenter>::OnTearDownView();
-        return;
-    }
-
-    void TraingEndnote2View::OnStop()
-    {
-        View<TraingEndnote2Presenter>::OnStop();
-        RootView::GetInstance()->RemoveAll();
-        return;
-    }
-}
diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnotePresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnotePresenter.cpp
deleted file mode 100644 (file)
index 9ae0f7a..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#include "AppViewIDs.h"
-#include "components/ui_label_ext.h"
-#include"language/font/ui_resource_string.h"
-#include "NativeAbility.h"
-
-#include <iostream>
-#include <chrono>
-#include <thread>
-#include "traing/include/TraingEndnotePresenter.h"
-// #include "TraingEndnoteView.h"
-
-namespace OHOS
-{
-
-    // 当前Presenter属性实例化的内存指针
-    static TraingEndnotePresenter *g_pTraingEndnotePresenter = nullptr;
-
-    TraingEndnotePresenter::TraingEndnotePresenter()
-    {
-
-        g_pTraingEndnotePresenter = this;
-    }
-
-    TraingEndnotePresenter::~TraingEndnotePresenter()
-    {
-
-        g_pTraingEndnotePresenter = nullptr;
-    }
-
-    TraingEndnotePresenter *TraingEndnotePresenter::GetInstance()
-    {
-
-        return g_pTraingEndnotePresenter;
-    }
-
-    void TraingEndnotePresenter::OnStart()
-    {
-
-        Presenter<TraingEndnoteView>::OnStart();
-    }
-
-    void TraingEndnotePresenter::OnPause(void)
-    {
-
-        Presenter<TraingEndnoteView>::OnPause();
-    }
-
-    void TraingEndnotePresenter::OnResume(void)
-    {
-
-        Presenter<TraingEndnoteView>::OnResume();
-    }
-
-    void TraingEndnotePresenter::OnStop(void)
-    {
-
-        Presenter<TraingEndnoteView>::OnStop();
-    }
-
-    bool TraingEndnotePresenter::OnDrag(UIView &view, const DragEvent &event)
-    {
-
-        // if (event.GetDragDirection() == DragEvent::DIRECTION_TOP_TO_BOTTOM)
-        // {
-        //     NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGDATA);
-        // }
-        UNUSED(view);
-        return true;
-    }
-
-    bool TraingEndnotePresenter::OnClick(UIView &view, const ClickEvent &event)
-    {
-
-        // 根据控件id查找是哪个控件触发了点击回调
-        if (strcmp(view.GetViewId(), BUTTONNO) == 0)
-        {
-            //NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGCONTROL);
-        }
-        if (strcmp(view.GetViewId(), BUTTONYES) == 0)
-        {
-            NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGWIN);
-        }
-        return true;
-    }
-}
diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnoteView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEndnoteView.cpp
deleted file mode 100644 (file)
index 59a6739..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-
-#include "traing/include/TraingEndnoteView.h"
-
-#include "common/image_cache_manager.h"
-#include "components/ui_label_ext.h"
-#include "language/font/ui_resource_string.h"
-#include "UiConfig.h"
-#include "ui_resource_image.h"
-#include <ui_scroll_view.h>
-#include "components/ui_button.h"
-#include "traing/include/TraingModel.h"
-#include "traing/Training_UiConfig.h"
-
-namespace OHOS
-{
-
-    static TraingEndnoteView *g_pTraingEndnoteView{nullptr};
-
-    TraingEndnoteView::TraingEndnoteView()
-    {
-        g_pTraingEndnoteView = this;
-    }
-
-    TraingEndnoteView::~TraingEndnoteView()
-    {
-        DeInit();
-        g_pTraingEndnoteView = nullptr;
-    }
-
-    TraingEndnoteView *TraingEndnoteView::GetInstance()
-    {
-
-        return g_pTraingEndnoteView;
-    }
-
-    /* InitView:初始化界面*/
-    void TraingEndnoteView ::InitView()
-    {
-        if (container_ == nullptr)
-        {
-            container_ = new UIViewGroup();
-            container_->SetPosition(0, 0, 466, 466);
-            container_->SetStyle(STYLE_BACKGROUND_OPA, 0);
-        }
-
-        // 初始化Lable
-        TraingModel::GetInstance()->InitLabel(label1_, 173, 52, 90, 35, "label1", "结束运动", DEFAULT_VECTOR_FONT_FILENAME, 30);
-        TraingModel::GetInstance()->InitLabel(label2_, 116, 187, 60, 40, "label2", "是否结束本次运动", DEFAULT_VECTOR_FONT_FILENAME, 26);
-
-        container_->Add(label1_);
-        container_->Add(label2_);
-
-        TraingModel::GetInstance()->InitButton(button1_, 111, 299, 100, 100, BUTTONNO);
-        button1_->SetOnClickListener(static_cast<UIView::OnClickListener *>(TraingEndnotePresenter::GetInstance()));
-        // Set additional property
-        button1_->SetImageSrc(NO_IMAGE, NO_IMAGE);
-
-        TraingModel::GetInstance()->InitButton(button2_, 256, 299, 100, 100, BUTTONYES);
-        button2_->SetOnClickListener(static_cast<UIView::OnClickListener *>(TraingEndnotePresenter::GetInstance()));
-        // Set additional property
-        button2_->SetImageSrc(YES_IMAGE, YES_IMAGE);
-
-        container_->Add(button1_);
-        container_->Add(button2_);
-    }
-
-    /* DeInit:删除组件 */
-    void TraingEndnoteView::DeInit()
-    {
-        container_->RemoveAll();
-        UIView *view = static_cast<UIViewGroup *>(container_)->GetChildrenHead();
-        while (view != nullptr)
-        {
-            UIView *tempView = view;
-            view = view->GetNextSibling();
-            if (tempView->GetParent())
-            {
-                static_cast<UIViewGroup *>(tempView->GetParent())->Remove(tempView);
-            }
-            delete tempView;
-        }
-        delete container_;
-        container_ = nullptr;
-    }
-
-    void TraingEndnoteView::PreLoad(void)
-    {
-        if (!viewiInitStatus)
-        {
-            InitView();
-            viewiInitStatus = true;
-        }
-    }
-    void TraingEndnoteView::OnStart()
-    {
-        container_ = new UIViewGroup();
-        if (container_ == nullptr)
-        {
-            return;
-        }
-        container_->SetPosition(0, 0);
-        container_->SetWidth(Screen::GetInstance().GetWidth());
-        container_->SetHeight(Screen::GetInstance().GetHeight());
-
-        // 创建 draglistener 实例并设置为拖动监听器
-        UIView::OnDragListener *draglistener = static_cast<UIView::OnDragListener *>(TraingEndnotePresenter::GetInstance());
-        if (draglistener == nullptr)
-        {
-            return;
-        }
-        container_->SetOnDragListener(draglistener);
-
-        container_->SetTouchable(true);
-        container_->SetDraggable(true);
-
-        PreLoad();
-        RootView::GetInstance()->Add(container_);
-    }
-
-    void TraingEndnoteView::OnSetUpView()
-    {
-
-        View<TraingEndnotePresenter>::OnSetUpView();
-        Draw();
-    }
-
-    void TraingEndnoteView::OnTearDownView()
-    {
-
-        View<TraingEndnotePresenter>::OnTearDownView();
-        return;
-    }
-
-    void TraingEndnoteView::OnStop()
-    {
-        View<TraingEndnotePresenter>::OnStop();
-        RootView::GetInstance()->RemoveAll();
-        return;
-    }
-}
index 5c7e9b4..f8c4378 100644 (file)
@@ -187,7 +187,7 @@ namespace OHOS
         TrainingDetailView::GetInstance()->GetStepLabel()->SetText(stepsStr.c_str());\r
 \r
         WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ControlSensor--Calories: %s, Distance: %s, Steps: %s", calorieStr.c_str(), distanceStr.c_str(), stepsStr.c_str());\r
-\r
+        \r
         // 释放sportdata内存\r
     }\r
     /*刷新time和data*/\r