From: Caisking <3449750381@qq.com> Date: Sat, 13 Apr 2024 09:04:26 +0000 (+0800) Subject: 合并UI X-Git-Tag: release_V1.2.70_20241020_135402~1198 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=98e4d97e7d7f7502e0ed2f1a44a8cd464eea2671;p=mirrors%2FFD230.git 合并UI --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/Training_UiConfig.h b/code/sdk/application/wearable/fd230app/nativeui/traing/Training_UiConfig.h index 4bf5d9cc9..d0bbb4259 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/Training_UiConfig.h +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/Training_UiConfig.h @@ -54,6 +54,7 @@ namespace OHOS static constexpr const char *BUTTONGROUND2_IMAGE = MODULES "/Buttonground2.bin"; static constexpr const char *BUBBLE_IMAGE = MODULES "/Bubble.bin"; static constexpr const char *BUTTONOK_IMAGE = MODULES "/Buttonok.bin"; + static constexpr const char *COLOR_PROGRESS_IMAGE = MODULES "/Color_Progress.bin"; static constexpr const char *CALORIES_IMAGE = MODULES "/Calories.bin"; static constexpr const char *CALORIES_30_IMAGE = MODULES "/Calories_30.bin"; static constexpr const char *CONTROL_POINT_IMAGE = MODULES "/Control_point.bin"; @@ -92,6 +93,7 @@ namespace OHOS static constexpr const char *SPORT_STOP_IMAGE = MODULES "/Sport_stop.bin"; static constexpr const char *SPORT_STRENGTH_IMAGE = MODULES "/Sport_strength.bin"; static constexpr const char *STEP_30_IMAGE = MODULES "/Step_30.bin"; + static constexpr const char *SPORT_HEARTRATE_IMAGE = MODULES "/sport_heartrate.bin"; static constexpr const char *TIME_IMAGE = MODULES "/Time.bin"; static constexpr const char *WALKING_54_IMAGE = MODULES "/Walking_54.bin"; static constexpr const char *WARNING_IMAGE = MODULES "/Warning.bin"; diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingDataView.h b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingDataView.h index 7fd16b2a0..b12fbabde 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingDataView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingDataView.h @@ -42,6 +42,8 @@ namespace OHOS void PreLoad(void) override; void UnLoad(void) override; UILabelExt *GetTimeLabel(); + UILabelExt *GetHeartLabel(); + void UpdataTime(); private: @@ -51,14 +53,14 @@ namespace OHOS UIViewGroup *container_ = nullptr; - UILabelExt *curtimelabel = nullptr; // 当前时间 - UILabelExt *sportlabel = nullptr; // 运动项目名称 - UILabelExt *timerlabel = nullptr; // 计时 - UILabelExt *heartlabel = nullptr; // 运动实时心率 - UILabelExt *strengthlabel = nullptr; // 运动强度 + UILabelExt *curtimelabel = nullptr; // 当前时间 + UILabelExt *sportlabel = nullptr; // 运动项目名称 + UILabelExt *timerlabel = nullptr; // 计时 + UILabelExt *heartlabel = nullptr; // 运动实时心率 + UILabelExt *ubpmlabel = nullptr; // 运动强度 UIImageView *image_progress = nullptr; - UIImageView *image_arrows = nullptr; + UIImageView *image_heart = nullptr; UIImageView *image_lowIntensity = nullptr; // 低等强度 UIImageView *image_mediumIntensity = nullptr; // 中等强度 UIImageView *image_highIntensity = nullptr; // 高等强度 diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingDetailView.h b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingDetailView.h index 97459abaf..34ab3e167 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingDetailView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingDetailView.h @@ -41,7 +41,7 @@ namespace OHOS void PreLoad(void) override; void UnLoad(void) override; - UILabelExt *GetHeartLabel(); + UILabelExt *GetMileLabel(); UILabelExt *GetStepLabel(); UILabelExt *GetCalorieLabel(); @@ -53,22 +53,17 @@ namespace OHOS UIViewGroup *container_ = nullptr; - UILabelExt *u_heartlabel = nullptr; + UILabelButtonExt *intensity_button{nullptr}; + UILabelExt *u_milelabel = nullptr; UILabelExt *u_stepslabel = nullptr; UILabelExt *u_calorielabel = nullptr; - UILabelExt *heartlabel = nullptr; UILabelExt *milelabel = nullptr; UILabelExt *steplabel = nullptr; UILabelExt *calorielabel = nullptr; - UIImageView *heartimage = nullptr; - UIImageView *mileimage = nullptr; - UIImageView *stepimage = nullptr; - UIImageView *calorieimage = nullptr; - UIImageView *lineimage1_ = nullptr; + UIImageView *progress_image = nullptr; UIImageView *lineimage2_ = nullptr; - UIImageView *lineimage3_ = nullptr; bool viewiInitStatus{false}; }; diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingEndNoteView.h b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingEndNoteView.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingEndView.h b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/include/TrainingEndView.h deleted file mode 100644 index e69de29bb..000000000 diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TraingCardPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TraingCardPresenter.cpp index aac7c2179..87be72ba7 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TraingCardPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TraingCardPresenter.cpp @@ -106,6 +106,7 @@ namespace OHOS } /* --------------------------------- cywee库操作 -------------------------------- */ + /*开启cywee*/ bool TraingCardPresenter::OpenSensor(ExerciseClass type) { // 根据不同的运动项目进行不同的运动 @@ -114,22 +115,22 @@ namespace OHOS switch (type) { case ExerciseClass::NORMAL: - do_cywee_service_check_msg(SPORT_ACTIVE_MODE_NORMAL); + do_cywee_service_check_msg(CYWEE_SERVICE_CMD_NORMAL_MODE); break; case ExerciseClass::TREADMILL: - do_cywee_service_check_msg(SPORT_ACTIVE_MODE_TREADMILL); + do_cywee_service_check_msg(CYWEE_SERVICE_CMD_TREADMILL_MODE); break; case ExerciseClass::OUTDOOR: - do_cywee_service_check_msg(SPORT_ACTIVE_MODE_OUTDOOR_RUNNING); + do_cywee_service_check_msg(CYWEE_SERVICE_CMD_OUTDOOR_RUNNING_MODE); break; case ExerciseClass::INDOOR: - do_cywee_service_check_msg(SPORT_ACTIVE_MODE_INDOOR_RUNNING); + do_cywee_service_check_msg(CYWEE_SERVICE_CMD_INDOOR_RUNNING_MODE); break; case ExerciseClass::FITNESS_PEDOMETER: - do_cywee_service_check_msg(SPORT_ACTIVE_MODE_FITNESS_PEDOMETERR); + do_cywee_service_check_msg(CYWEE_SERVICE_CMD_FITNESS_PEDOMETER_MODE); break; case ExerciseClass::FREE_TRAINING: - do_cywee_service_check_msg(SPORT_ACTIVE_MODE_FREE_TRAINING); + do_cywee_service_check_msg(CYWEE_SERVICE_CMD_FREE_TRAINING_MODE); break; default: break; @@ -138,6 +139,7 @@ namespace OHOS return true; } + /*控制cywee*/ bool TraingCardPresenter::ControlSensor(ExerciseState state) { switch (state) @@ -169,23 +171,26 @@ namespace OHOS return; } - double distance_km = sportdata->distance / 1000.0; // 转换为公里 - std::stringstream stream; - stream << std::fixed << std::setprecision(2) << distance_km; - std::string distanceStr = stream.str(); + double distance_km = sportdata->distance / 1000.0; // 转换为公里并保留两位小数 + std::stringstream ss; + ss << std::fixed << std::setprecision(2) << distance_km; + std::string distanceStr = ss.str(); - std::string calorieStr = (sportdata->calories != 0) ? std::to_string(sportdata->calories) : "--"; std::string durationStr = std::to_string(sportdata->duration); std::string stepsStr = (sportdata->steps != 0) ? std::to_string(sportdata->steps) : "--"; + std::string calorieStr = (sportdata->calories != 0) ? std::to_string(sportdata->calories) : "--"; + + TrainingDataView::GetInstance()->GetHeartLabel()->SetText("--"); - TrainingDetailView::GetInstance()->GetHeartLabel()->SetText("0"); TrainingDetailView::GetInstance()->GetCalorieLabel()->SetText(calorieStr.c_str()); TrainingDetailView::GetInstance()->GetMileLabel()->SetText(distanceStr.c_str()); TrainingDetailView::GetInstance()->GetStepLabel()->SetText(stepsStr.c_str()); - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ControlSensor--%s %s %s!!", calorieStr.c_str(), distanceStr.c_str(), stepsStr.c_str()); - } + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "ControlSensor--Calories: %s, Distance: %s, Steps: %s", calorieStr.c_str(), distanceStr.c_str(), stepsStr.c_str()); + // 释放sportdata内存 + } + /*刷新time和data*/ void TraingCardPresenter::Notify(void) { TrainingDataView::GetInstance()->UpdataTime(); @@ -225,7 +230,7 @@ namespace OHOS return true; } } - // 点击结束按键 + // 点击结束按键,弹窗显示 if (strcmp(view.GetViewId(), BUTTONEND) == 0) { ControlSensor(ExerciseState::Pause); diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingControlView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingControlView.cpp index c916ea008..233c1dcec 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingControlView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingControlView.cpp @@ -41,23 +41,23 @@ namespace OHOS void TrainingControlView ::InitView() { // 初始化Button - TraingModel::GetInstance()->InitButton(buttonEnd, 100, 202, 100, 100, BUTTONEND); + TraingModel::GetInstance()->InitButton(buttonEnd, 91, 205, 110, 110, BUTTONEND); // Set additional property buttonEnd->SetImageSrc(SPORT_STOP_IMAGE, SPORT_STOP_IMAGE); // 设置按钮的点击事件监听器为 TraingGPSPresenter 的实例 buttonEnd->SetOnClickListener(static_cast(TraingCardPresenter::GetInstance())); Add(buttonEnd); - TraingModel::GetInstance()->InitButton(buttonStop, 255, 202, 100, 100, BUTTONSTOP); + TraingModel::GetInstance()->InitButton(buttonStop, 261, 205, 110, 110, BUTTONSTOP); // Set additional property buttonStop->SetImageSrc(SPORT_PAUSE_IMAGE, SPORT_PAUSE_IMAGE); buttonStop->SetOnClickListener(static_cast(TraingCardPresenter::GetInstance())); Add(buttonStop); // 初始化Lable - TraingModel::GetInstance()->InitLabel(labeltitle, 188, 52, 90, 35, "label1", "训练中", DEFAULT_VECTOR_FONT_FILENAME, 30); - TraingModel::GetInstance()->InitLabel(labeltimer, 98, 110, 60, 35, "label2", "00:00:00", DEFAULT_VECTOR_FONT_FILENAME, 65); - TraingModel::GetInstance()->InitLabel(labelend, 125, 324, 60, 40, "label3", "结束", DEFAULT_VECTOR_FONT_FILENAME, 20); - TraingModel::GetInstance()->InitLabel(labelstop, 280, 324, 60, 40, "label4", "暂停", DEFAULT_VECTOR_FONT_FILENAME, 20); + TraingModel::GetInstance()->InitLabel(labeltitle, 83, 50, 300, 35, "label1", "训练中", DEFAULT_VECTOR_FONT_FILENAME, 30); + TraingModel::GetInstance()->InitLabel(labeltimer, 78, 110, 290, 80, "label2", "00:00:00", DEFAULT_VECTOR_FONT_FILENAME, 65); + TraingModel::GetInstance()->InitLabel(labelend, 81, 330, 130, 35, "label3", "结束", DEFAULT_VECTOR_FONT_FILENAME, 30); + TraingModel::GetInstance()->InitLabel(labelstop, 251, 330, 130, 35, "label4", "暂停", DEFAULT_VECTOR_FONT_FILENAME, 30); Add(labeltitle); Add(labeltimer); Add(labelend); diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDataView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDataView.cpp index b61bf673f..451ced152 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDataView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDataView.cpp @@ -40,34 +40,38 @@ namespace OHOS { // 初始化Image TraingModel::GetInstance()->InitImageView(image_progress, 13, 13, 440, 386, "image1", PROGRESS_IMAGE); - TraingModel::GetInstance()->InitImageView(image_arrows, 208, 297, 20, 20, "image2", ARROWS_IMAGE); - TraingModel::GetInstance()->InitImageView(image_lowIntensity, 98, 314, 270, 20, "image3", SPORT_STRENGTH_IMAGE); + TraingModel::GetInstance()->InitImageView(image_heart, 88, 295, 50, 50, "image2", SPORT_HEARTRATE_IMAGE); TraingModel::GetInstance()->InitImageView(image_iconup, 225, 396, 16, 10, "image4", INCO_UP_IMAGE); TraingModel::GetInstance()->InitImageView(image_iconpoint, 193, 421, 80, 20, "image5", DATA_POINT_IMAGE); Add(image_progress); - Add(image_arrows); - Add(image_lowIntensity); + Add(image_heart); Add(image_iconup); Add(image_iconpoint); // 初始化Lable - TraingModel::GetInstance()->InitLabel(curtimelabel, 185, 60, 90, 35, "label1", "23:54", DEFAULT_VECTOR_FONT_FILENAME, 40); - TraingModel::GetInstance()->InitLabel(sportlabel, 158, 120, 150, 35, "label2", "跳绳运动中", DEFAULT_VECTOR_FONT_FILENAME, 30); - TraingModel::GetInstance()->InitLabel(timerlabel, 90, 175, 60, 40, "label3", "00:00:00", DEFAULT_VECTOR_FONT_FILENAME, 80); - TraingModel::GetInstance()->InitLabel(heartlabel, 150, 276, 60, 40, "label4", "144", DEFAULT_VECTOR_FONT_FILENAME, 23); - TraingModel::GetInstance()->InitLabel(strengthlabel, 167, 350, 60, 40, "label4", "中等强度", DEFAULT_VECTOR_FONT_FILENAME, 26); + UIResourceTextId sport_id = TraingModel::GetInstance()->GetSportEvent(); + TraingModel::GetInstance()->InitLabelExt(sportlabel, 83, 120, 300, 35, "label2", sport_id, DEFAULT_VECTOR_FONT_FILENAME, 30); + sportlabel->SetTextColor(Color::Gray()); + + TraingModel::GetInstance()->InitLabel(curtimelabel, 155, 60, 150, 50, "label1", "23:54", DEFAULT_VECTOR_FONT_FILENAME, 40); + + TraingModel::GetInstance()->InitLabel(timerlabel, 40, 163, 400, 140, "label3", "00:00:00", DEFAULT_VECTOR_FONT_FILENAME, 90); + TraingModel::GetInstance()->InitLabel(heartlabel, 85, 284, 230, 80, "label4", "144", DEFAULT_VECTOR_FONT_FILENAME, 60); + TraingModel::GetInstance()->InitLabel(ubpmlabel, 218, 284, 230, 80, "label5", "bpm", DEFAULT_VECTOR_FONT_FILENAME, 60); + ubpmlabel->SetTextColor(Color::Gray()); Add(curtimelabel); Add(sportlabel); Add(timerlabel); Add(heartlabel); - Add(strengthlabel); + Add(ubpmlabel); +#if 0 // 初始化Button TraingModel::GetInstance()->InitButton(buttonNote, 275, 350, 26, 26, BUTTONNOTE); // Set additional property buttonNote->SetImageSrc(NOTE_IMAGE, NOTE_IMAGE); buttonNote->SetOnClickListener(static_cast(TraingCardPresenter::GetInstance())); Add(buttonNote); - - //增加上拉卡片 +#endif + // 增加上拉卡片 SetCoverable(true); } @@ -94,10 +98,10 @@ namespace OHOS delete heartlabel; heartlabel = nullptr; } - if (strengthlabel != nullptr) + if (ubpmlabel != nullptr) { - delete strengthlabel; - strengthlabel = nullptr; + delete ubpmlabel; + ubpmlabel = nullptr; } // 删除button if (buttonNote != nullptr) @@ -139,6 +143,10 @@ namespace OHOS { return timerlabel; } + UILabelExt *TrainingDataView::GetHeartLabel() + { + return heartlabel; + } /*更新当前时间*/ void TrainingDataView::UpdataTime() { diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDetailView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDetailView.cpp index 08fe4be02..f607d46cc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDetailView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingDetailView.cpp @@ -38,38 +38,33 @@ namespace OHOS void TrainingDetailView ::InitView() { // 初始化Image - TraingModel::GetInstance()->InitImageView(heartimage, 134, 58, 30, 30, "image1", HEARTRATE_30_IMAGE); - TraingModel::GetInstance()->InitImageView(mileimage, 44, 189, 30, 30, "image2", MILEAGE_30_IMAGE); - TraingModel::GetInstance()->InitImageView(stepimage, 297, 189, 30, 30, "image3", STEP_30_IMAGE); - TraingModel::GetInstance()->InitImageView(calorieimage, 129, 335, 30, 30, "image4", CALORIES_30_IMAGE); - TraingModel::GetInstance()->InitImageView(lineimage1_, 0, 160, 10, 466, "image5", LINE_1_IMAGE); - TraingModel::GetInstance()->InitImageView(lineimage2_, 233, 193, 80, 20, "image5", LINE_2_IMAGE); - TraingModel::GetInstance()->InitImageView(lineimage3_, 0, 306, 10, 466, "image5", LINE_1_IMAGE); - Add(heartimage); - Add(mileimage); - Add(stepimage); - Add(calorieimage); - Add(lineimage1_); + + TraingModel::GetInstance()->InitImageView(progress_image, 0, 0, 100, 100, "image5", COLOR_PROGRESS_IMAGE); + TraingModel::GetInstance()->InitImageView(lineimage2_, 225, 190, 80, 1, "image", LINE_2_IMAGE); + Add(progress_image); Add(lineimage2_); - Add(lineimage3_); + // 初始化Lable - TraingModel::GetInstance()->InitLabel(u_heartlabel, 174, 60, 90, 35, "label1", "心率(次/分)", DEFAULT_VECTOR_FONT_FILENAME, 26); - TraingModel::GetInstance()->InitLabel(u_milelabel, 80, 190, 60, 40, "label2", "距离(公里)", DEFAULT_VECTOR_FONT_FILENAME, 26); - TraingModel::GetInstance()->InitLabel(u_stepslabel, 332, 189, 60, 40, "label3", "步数", DEFAULT_VECTOR_FONT_FILENAME, 26); - TraingModel::GetInstance()->InitLabel(u_calorielabel, 167, 336, 60, 40, "label4", "卡路里(千卡)", DEFAULT_VECTOR_FONT_FILENAME, 26); - TraingModel::GetInstance()->InitLabel(heartlabel, 202, 94, 60, 40, "label5", "144", DEFAULT_VECTOR_FONT_FILENAME, 40); - TraingModel::GetInstance()->InitLabel(milelabel, 76, 233, 60, 40, "label6", "13.21", DEFAULT_VECTOR_FONT_FILENAME, 40); - TraingModel::GetInstance()->InitLabel(steplabel, 300, 233, 60, 40, "label7", "28312", DEFAULT_VECTOR_FONT_FILENAME, 40); - TraingModel::GetInstance()->InitLabel(calorielabel, 175, 376, 60, 40, "label8", "210.03", DEFAULT_VECTOR_FONT_FILENAME, 40); - Add(u_heartlabel); + TraingModel::GetInstance()->InitLabel(u_milelabel, 16, 234, 220, 35, "label2", "距离(公里)", DEFAULT_VECTOR_FONT_FILENAME, 30); + TraingModel::GetInstance()->InitLabel(u_stepslabel, 73, 362, 320, 35, "label3", "步数", DEFAULT_VECTOR_FONT_FILENAME, 30); + TraingModel::GetInstance()->InitLabel(u_calorielabel, 225, 235, 230, 35, "label4", "卡路里(千卡)", DEFAULT_VECTOR_FONT_FILENAME, 30); + u_milelabel->SetTextColor(Color::Gray()); + u_stepslabel->SetTextColor(Color::Gray()); + u_calorielabel->SetTextColor(Color::Gray()); + + TraingModel::GetInstance()->InitLabel(milelabel, 17, 170, 200, 60, "label6", "13.21", DEFAULT_VECTOR_FONT_FILENAME, 60); + TraingModel::GetInstance()->InitLabel(calorielabel, 230, 170, 200, 60, "label7", "28312", DEFAULT_VECTOR_FONT_FILENAME, 60); + TraingModel::GetInstance()->InitLabel(steplabel, 133, 296, 200, 60, "label8", "210.03", DEFAULT_VECTOR_FONT_FILENAME, 60); Add(u_milelabel); Add(u_stepslabel); Add(u_calorielabel); - Add(heartlabel); Add(milelabel); Add(steplabel); Add(calorielabel); + TraingModel::GetInstance()->InitButtonExt(intensity_button, 103, 70, 260, 80, "button", STR_MEDIUM_STRENGTH, 30); + Add(intensity_button); + SetTouchable(true); // SetIntercept(true); } @@ -77,11 +72,6 @@ namespace OHOS void TrainingDetailView::DeInit() { RemoveAll(); - if (u_heartlabel != nullptr) - { - delete u_heartlabel; - u_heartlabel = nullptr; - } if (u_milelabel != nullptr) { delete u_milelabel; @@ -97,11 +87,6 @@ namespace OHOS delete u_calorielabel; u_calorielabel = nullptr; } - if (heartlabel != nullptr) - { - delete heartlabel; - heartlabel = nullptr; - } if (milelabel != nullptr) { delete milelabel; @@ -118,41 +103,20 @@ namespace OHOS calorielabel = nullptr; } - // 删除Image - if (heartimage != nullptr) - { - delete heartimage; - heartimage = nullptr; - } - if (mileimage != nullptr) - { - delete mileimage; - mileimage = nullptr; - } - if (stepimage != nullptr) - { - delete stepimage; - stepimage = nullptr; - } - if (calorieimage != nullptr) + if (progress_image != nullptr) { - delete calorieimage; - calorieimage = nullptr; - } - if (lineimage1_ != nullptr) - { - delete lineimage1_; - lineimage1_ = nullptr; + delete progress_image; + progress_image = nullptr; } if (lineimage2_ != nullptr) { delete lineimage2_; lineimage2_ = nullptr; } - if (lineimage3_ != nullptr) + if (intensity_button != nullptr) { - delete lineimage3_; - lineimage3_ = nullptr; + delete intensity_button; + intensity_button = nullptr; } } @@ -168,10 +132,6 @@ namespace OHOS void TrainingDetailView::UnLoad(void) {} - UILabelExt *TrainingDetailView::GetHeartLabel() - { - return heartlabel; - } UILabelExt *TrainingDetailView::GetMileLabel() { return milelabel; diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingEndNoteView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingEndNoteView.cpp deleted file mode 100644 index e69de29bb..000000000 diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingEndView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/training_card/src/TrainingEndView.cpp deleted file mode 100644 index e69de29bb..000000000 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Color_Progress.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Color_Progress.bin new file mode 100644 index 000000000..da0c82952 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Color_Progress.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_continue.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_continue.bin index dfa9eaf08..29fa070bb 100644 Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_continue.bin and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_continue.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_pause.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_pause.bin index 80a752d99..09cfcda72 100644 Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_pause.bin and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_pause.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_stop.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_stop.bin index 2e1205517..7b5a977a5 100644 Binary files a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_stop.bin and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/Sport_stop.bin differ diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/sport_heartrate.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/sport_heartrate.bin new file mode 100644 index 000000000..9b6dd786d Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/sport_heartrate.bin differ