From: Caisking <3449750381@qq.com> Date: Tue, 19 Mar 2024 12:52:08 +0000 (+0800) Subject: 目前训练UI还有部分bug,后续更改 X-Git-Tag: release_V1.2.70_20241020_135402~1293^2 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=5c13d3e7dc9e0d310c8e7d65e563f9f1eceb0c19;p=mirrors%2FFD230.git 目前训练UI还有部分bug,后续更改 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingDataPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingDataPresenter.cpp index 6078f2cfa..d55dc6c31 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingDataPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingDataPresenter.cpp @@ -71,6 +71,10 @@ namespace OHOS { NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGSTRONG); } + if (strcmp(view.GetViewId(), BUTTONNOTE) == 0) + { + NativeAbility::GetInstance().ChangeSlice(VIEW_TRAININGSTRONG); + } return true; } } 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 f469d6de9..8d5d8c199 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEnddataPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingEnddataPresenter.cpp @@ -68,11 +68,10 @@ namespace OHOS bool TraingEnddataPresenter::OnClick(UIView &view, const ClickEvent &event) { - // 根据控件id查找是哪个控件触发了点击回调 if (strcmp(view.GetViewId(), BUTTONBACK) == 0) { - //NativeAbility::GetInstance().ChangeSlice(VIEW_TRAINING); + NativeAbility::GetInstance().ChangeSlice(VIEW_TRAINING); } return true; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/traingrecord/src/TraingRecordView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traingrecord/src/TraingRecordView.cpp index 169885ef8..6a3fe240b 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traingrecord/src/TraingRecordView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traingrecord/src/TraingRecordView.cpp @@ -172,16 +172,15 @@ namespace OHOS /* DeInit:删除组件 */ void TraingRecordView::DeInit() { - UIView *view = static_cast(container_)->GetChildrenHead(); - while (view != nullptr) + if (label1_ != nullptr) { - UIView *tempView = view; - view = view->GetNextSibling(); - if (tempView->GetParent()) - { - static_cast(tempView->GetParent())->Remove(tempView); - } - delete tempView; + delete label1_; + label1_ = nullptr; + } + if (label2_ != nullptr) + { + delete label2_; + label2_ = nullptr; } delete container_; container_ = nullptr;