From: Caisking <3449750381@qq.com> Date: Sat, 30 Mar 2024 09:52:20 +0000 (+0800) Subject: 修改训练卡片;增加表盘xml文件 X-Git-Tag: release_V1.2.70_20241020_135402~1241^2~7 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=09c39404b452f675952bf76278ab233d0a29a0b9;p=mirrors%2FFD230.git 修改训练卡片;增加表盘xml文件 --- 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 4290b0d3d..4bf5d9cc9 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/Training_UiConfig.h +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/Training_UiConfig.h @@ -75,6 +75,7 @@ namespace OHOS static constexpr const char *LINE_2_IMAGE = MODULES "/Line_2.bin"; static constexpr const char *MILEAGE_30_IMAGE = MODULES "/Mileage_30.bin"; static constexpr const char *MORE_IMAGE = MODULES "/More.bin"; + static constexpr const char *MORE_ICON_IMAGE = MODULES "/More_icon.bin"; static constexpr const char *MOREVIEW_IMAGE = MODULES "/MoreView.bin"; static constexpr const char *NO_IMAGE = MODULES "/No.bin"; static constexpr const char *NOTE_IMAGE = MODULES "/Note.bin"; diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingView.h b/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingView.h index 2d1becd26..602992688 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/include/TraingView.h @@ -55,6 +55,7 @@ namespace OHOS UIImageView *btn1_image = nullptr; UIImageView *btn2_image = nullptr; UIImageView *btn3_image = nullptr; + UIImageView *btnmore_image = nullptr; }; } // namespace OHOS #endif // Traing_PRESENTER_H diff --git a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingView.cpp b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingView.cpp index dd97ffbbb..731dc9672 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/traing/src/TraingView.cpp @@ -42,6 +42,9 @@ namespace OHOS static constexpr uint16_t BTN3_IMAGE_X = 129; static constexpr uint16_t BTN3_IMAGE_Y = 298; + static constexpr uint16_t BTNMORE_IMAGE_X = 276; + static constexpr uint16_t BTNMORE_IMAGE_Y = 324; + static TraingView *g_pTraingView{nullptr}; static QuickTraining *data = new QuickTraining; @@ -78,6 +81,7 @@ namespace OHOS TraingModel::GetInstance()->InitLabel(btn1_label, BTN1_LABEL_X, BTN1_LABEL_Y, LABEL_X_SIZE, LABEL_Y_SIZE, "btu1_label", dataStr1, DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT_SIZE); TraingModel::GetInstance()->InitLabel(btn2_label, BTN2_LABEL_X, BTN2_LABEL_Y, LABEL_X_SIZE, LABEL_Y_SIZE, "btu2_label", dataStr2, DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT_SIZE); TraingModel::GetInstance()->InitLabel(btn3_label, BTN3_LABEL_X, BTN3_LABEL_Y, LABEL_X_SIZE, LABEL_Y_SIZE, "btu3_label", dataStr3, DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT_SIZE); + TraingModel::GetInstance()->InitLabel(btnmore_label, BTN2_LABEL_X, BTN3_LABEL_Y, LABEL_X_SIZE, LABEL_Y_SIZE, "btumore_label", "更多", DEFAULT_VECTOR_FONT_FILENAME, LABEL_FONT_SIZE); return true; } @@ -94,12 +98,12 @@ namespace OHOS button2_->SetOnClickListener(button2Click); TraingModel::GetInstance()->InitButton(button3_, BUTTON3_X, BUTTON3_Y, BUTTON_WIDHT, BUTTON_HEIGHT, BUTTON3); - button3_->SetImageSrc(BUTTONGROUND2_IMAGE, nullptr); + button3_->SetImageSrc(BOUTTONGROUND_IMAGE, nullptr); UIView::OnClickListener *button3Click = static_cast(TraingPresenter::GetInstance()); button3_->SetOnClickListener(button3Click); TraingModel::GetInstance()->InitButton(buttonmore_, BUTTONMORE_X, BUTTONMORE_Y, BUTTON_WIDHT, BUTTON_HEIGHT, BUTTONMORE); - buttonmore_->SetImageSrc(MORE_IMAGE, nullptr); + buttonmore_->SetImageSrc(BUTTONGROUND2_IMAGE, nullptr); UIView::OnClickListener *button4Click = static_cast(TraingPresenter::GetInstance()); buttonmore_->SetOnClickListener(button4Click); @@ -121,6 +125,7 @@ namespace OHOS TraingModel::GetInstance()->InitImageView(btn1_image, BTN1_IMAGE_X, BTN1_IMAGE_Y, BTN_IMAGE_SIZE, BTN_IMAGE_SIZE, "btn1_image", dataStr1); TraingModel::GetInstance()->InitImageView(btn2_image, BTN2_IMAGE_X, BTN2_IMAGE_Y, BTN_IMAGE_SIZE, BTN_IMAGE_SIZE, "btn2_image", dataStr2); TraingModel::GetInstance()->InitImageView(btn3_image, BTN3_IMAGE_X, BTN3_IMAGE_Y, BTN_IMAGE_SIZE, BTN_IMAGE_SIZE, "btn3_image", dataStr3); + TraingModel::GetInstance()->InitImageView(btnmore_image, BTNMORE_IMAGE_X, BTNMORE_IMAGE_Y, BTN_IMAGE_SIZE, BTN_IMAGE_SIZE, "btnmore_image", MORE_ICON_IMAGE); return true; } void TraingView::InitView() @@ -143,13 +148,17 @@ namespace OHOS container_->Add(button2_); container_->Add(button3_); container_->Add(buttonmore_); + container_->Add(title_label); container_->Add(btn1_label); container_->Add(btn2_label); container_->Add(btn3_label); + container_->Add(btnmore_label); + container_->Add(btn1_image); container_->Add(btn2_image); container_->Add(btn3_image); + container_->Add(btnmore_image); WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TraingModel::InitView"); } @@ -197,6 +206,11 @@ namespace OHOS delete btn3_label; btn3_label = nullptr; } + if (btnmore_label != nullptr) + { + delete btnmore_label; + btnmore_label = nullptr; + } if (btn1_image != nullptr) { delete btn1_image; @@ -212,6 +226,11 @@ namespace OHOS delete btn3_image; btn3_image = nullptr; } + if (btnmore_image != nullptr) + { + delete btnmore_image; + btnmore_image = nullptr; + } // 删除容器 if (container_ != nullptr) { diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/More_icon.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/More_icon.bin new file mode 100644 index 000000000..e98798a25 Binary files /dev/null and b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/Training/modules/More_icon.bin differ diff --git a/dial_resource_files/Dynamic_cat.xml b/dial_resource_files/Dynamic_cat.xml new file mode 100644 index 000000000..cd608b479 --- /dev/null +++ b/dial_resource_files/Dynamic_cat.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/KUMI.xml b/dial_resource_files/KUMI.xml new file mode 100644 index 000000000..b1e3b619b --- /dev/null +++ b/dial_resource_files/KUMI.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/classic.xml b/dial_resource_files/classic.xml new file mode 100644 index 000000000..7dd842fc5 --- /dev/null +++ b/dial_resource_files/classic.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/dial_defult.xml b/dial_resource_files/dial_defult.xml new file mode 100644 index 000000000..3f2a349dd --- /dev/null +++ b/dial_resource_files/dial_defult.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/dog.xml b/dial_resource_files/dog.xml new file mode 100644 index 000000000..563a0ffa4 --- /dev/null +++ b/dial_resource_files/dog.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/galaxy.xml b/dial_resource_files/galaxy.xml new file mode 100644 index 000000000..d7d325769 --- /dev/null +++ b/dial_resource_files/galaxy.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/geometry.xml b/dial_resource_files/geometry.xml new file mode 100644 index 000000000..902714bdc --- /dev/null +++ b/dial_resource_files/geometry.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/jellyfish.xml b/dial_resource_files/jellyfish.xml new file mode 100644 index 000000000..789505705 --- /dev/null +++ b/dial_resource_files/jellyfish.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/maomao.xml b/dial_resource_files/maomao.xml new file mode 100644 index 000000000..1d5332a88 --- /dev/null +++ b/dial_resource_files/maomao.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dial_resource_files/panda.xml b/dial_resource_files/panda.xml new file mode 100644 index 000000000..b24919258 --- /dev/null +++ b/dial_resource_files/panda.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + \ No newline at end of file