From 9cfb03c9a9ca80969369754ce7d9bedf2b323de0 Mon Sep 17 00:00:00 2001 From: hcj <1224667075@qq.com> Date: Thu, 18 Jul 2024 20:39:26 +0800 Subject: [PATCH] =?utf8?q?=E6=94=AF=E4=BB=98=E5=AE=9DUI=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativelauncher/include/UiConfig.h | 3 + .../nativeui/alipay/include/AlipayBindAni.h | 1 + .../nativeui/alipay/include/AlipayExitBind.h | 1 + .../nativeui/alipay/include/AlipayUnbind.h | 1 + .../nativeui/alipay/src/AlipayBindAni.cpp | 80 ++++++++++++------- .../nativeui/alipay/src/AlipayBindRes.cpp | 35 ++++---- .../nativeui/alipay/src/AlipayExitBind.cpp | 73 +++++++++++------ .../nativeui/alipay/src/AlipayPayCode.cpp | 2 +- .../nativeui/alipay/src/AlipayUnbind.cpp | 67 ++++++++++------ .../alipay/src/AlipayUnbindFinish.cpp | 21 ++--- .../fd230app/nativeui/goal/src/goalview.cpp | 2 +- .../nativeui/alipay/include/AlipayBindAni.h | 1 + .../nativeui/alipay/include/AlipayUnbind.h | 1 + .../fd230/fs/user/res/alipay/1.bin | 3 + .../fd230/fs/user/res/alipay/2.bin | 3 + .../fd230/fs/user/res/alipay/3.bin | 3 + .../fd230/fs/user/res/alipay/4.bin | 3 + .../fd230/fs/user/res/alipay/5.bin | 3 + .../fd230/fs/user/res/alipay/6.bin | 3 + .../fd230/fs/user/res/alipay/7.bin | 3 + .../fd230/fs/user/res/alipay/8.bin | 3 + .../fd230/fs/user/res/alipay/alipaylog.bin | 3 + .../fd230/fs/user/res/alipay/no.bin | 3 + .../fd230/fs/user/res/alipay/yes.bin | 3 + 24 files changed, 216 insertions(+), 105 deletions(-) create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/1.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/2.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/3.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/4.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/5.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/6.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/7.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/8.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/alipaylog.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/no.bin create mode 100644 code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/yes.bin diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h index 7508123e4..17499f084 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/UiConfig.h @@ -199,6 +199,8 @@ namespace OHOS static constexpr const char *PNG_ALIPAY_LIST_HELP = APP_RES_PATH "/alipay/ALIPAY_LIST_HELP.bin"; static constexpr const char *PNG_ALIPAY_PAY_ICON_WHITE = APP_RES_PATH "/alipay/ALIPAY_PAY_ICON_WHITE.bin"; static constexpr const char *PNG_ALIPAY_PAY_ICON_GREY = APP_RES_PATH "/alipay/ALIPAY_PAY_ICON_GREY.bin"; + static constexpr const char *PNG_ALIPAY_YSE_ICON = APP_RES_PATH "/alipay/yes.bin"; + static constexpr const char *PNG_ALIPAY_NO_ICON = APP_RES_PATH "/alipay/no.bin"; /* ----------------------------------- 录音 ----------------------------------- */ static constexpr const char *PNG_ANIMATOR1_IMAGE = APP_RES_PATH "/record/animator1.bin"; static constexpr const char *PNG_ANIMATOR2_IMAGE = APP_RES_PATH "/record/animator2.bin"; @@ -251,6 +253,7 @@ namespace OHOS static constexpr const char *PNG_A019_095_IMAGE_PATH = APP_RES_PATH "/BLUETOOTH_IMAGE_16.bin"; static constexpr const char *PNG_BLUETOOTHEAR = APP_RES_PATH "/BLUETOOTHEAR.bin"; /* --------------------------------- AppList -------------------------------- */ + static constexpr const char *PNG_APPLIST_THEME_IMAGE = APP_LIST_PATH "/theme.bin"; // 显示方式 static constexpr const char *PNG_APPLIST_CARDSET_IMAGE = APP_LIST_PATH "/cardsetting.bin"; // 卡片管理 static constexpr const char *PNG_APPLIST_CHANGEDIAL_IMAGE = APP_LIST_PATH "/changedial.bin"; // 切换表盘 diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindAni.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindAni.h index d2f4f45c7..8e31812de 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindAni.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayBindAni.h @@ -31,6 +31,7 @@ private: UILabel *alipayLabel { nullptr }; UIImageAnimatorView *alipayImageAni { nullptr }; ImageAnimatorInfo searchImageInfo[ALIPAY_BIND_SEARCH_IMAGE_NUM]; + UIImageView *alipaylogImage { nullptr }; }; } #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayExitBind.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayExitBind.h index 08a862791..0446d6612 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayExitBind.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayExitBind.h @@ -28,6 +28,7 @@ private: AlipayPresenter *presenter_; UILabel *alipayLabel[ALIPAY_SET_TWO] { nullptr }; UILabelButton *alipayButton[ALIPAY_SET_TWO] { nullptr }; + UIImageView *AttentionImage { nullptr }; }; } #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbind.h b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbind.h index 8c1514696..7bfefc88c 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbind.h +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/include/AlipayUnbind.h @@ -28,6 +28,7 @@ private: AlipayPresenter *presenter_; UILabel *alipayLabel[ALIPAY_SET_TWO] { nullptr }; UILabelButton *alipayButton[ALIPAY_SET_TWO] { nullptr }; + UIImageView *AttentionImage { nullptr }; }; } #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindAni.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindAni.cpp index 4574cb9f5..117abd3fd 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindAni.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindAni.cpp @@ -14,35 +14,46 @@ #include "graphic_service.h" namespace OHOS { -static const int16 ANILABEL_X_FIRST = 151; -static const int16 ANILABEL_Y_FIRST = 257; -static const int16 ANILABEL_WIDTH_FIRST = 151; -static const int16 ANILABEL_HEIGHT_FIRST = 48; +static const int16 ANILABEL_X_FIRST = 133; +static const int16 ANILABEL_Y_FIRST = 328; +static const int16 ANILABEL_WIDTH_FIRST = 200; +static const int16 ANILABEL_HEIGHT_FIRST = 60; static const char *ANILABEL_TEXT_FIRST = (char *)"正在绑定"; -static const int16 ANILABEL_FONT_FIRST = 38; +static const int16 ANILABEL_FONT_FIRST = 30; + +static constexpr const char *PNG_1_PATH = "user/res/alipay/1.bin"; +static constexpr const char *PNG_2_PATH = "user/res/alipay/2.bin"; +static constexpr const char *PNG_3_PATH = "user/res/alipay/3.bin"; +static constexpr const char *PNG_4_PATH = "user/res/alipay/4.bin"; +static constexpr const char *PNG_5_PATH = "user/res/alipay/5.bin"; +static constexpr const char *PNG_6_PATH = "user/res/alipay/6.bin"; +static constexpr const char *PNG_7_PATH = "user/res/alipay/7.bin"; +static constexpr const char *PNG_8_PATH = "user/res/alipay/8.bin"; + +static constexpr const char *PNG_LOG_PATH = "user/res/alipay/alipaylog.bin"; const char *searchImagePath[ALIPAY_BIND_SEARCH_IMAGE_NUM] = { - PNG_A019_080_IMAGE_PATH, - PNG_A019_081_IMAGE_PATH, - PNG_A019_082_IMAGE_PATH, - PNG_A019_083_IMAGE_PATH, - PNG_A019_084_IMAGE_PATH, - PNG_A019_085_IMAGE_PATH, - PNG_A019_086_IMAGE_PATH, - PNG_A019_087_IMAGE_PATH, + PNG_1_PATH, + PNG_2_PATH, + PNG_3_PATH, + PNG_4_PATH, + PNG_5_PATH, + PNG_6_PATH, + PNG_7_PATH, + PNG_8_PATH, }; -static const int16 ALIPAY_BIND_IMAGE_X = 162; -static const int16 ALIPAY_BIND_IMAGE_Y = 112; -static const int16 ALIPAY_BIND_IMAGE_WIDTH = 128; -static const int16 ALIPAY_BIND_IMAGE_HEIGHT = 128; +static const int16 ALIPAY_BIND_IMAGE_X = 149; +static const int16 ALIPAY_BIND_IMAGE_Y = 358; +static const int16 ALIPAY_BIND_IMAGE_WIDTH = 168; +static const int16 ALIPAY_BIND_IMAGE_HEIGHT = 40; -static const int16 ALIPAY_BIND_IMAGE_DELAY = 200; +static const int16 ALIPAY_BIND_IMAGE_DELAY = 100; -static const int16 RES_IMAGE_X = 162; -static const int16 RES_IMAGE_Y = 112; -static const int16 RES_IMAGE_WIDTH = 128; -static const int16 RES_IMAGE_HEIGHT = 128; +static const int16 RES_IMAGE_X = 149; +static const int16 RES_IMAGE_Y = 358; +static const int16 RES_IMAGE_WIDTH = 168; +static const int16 RES_IMAGE_HEIGHT = 40; AlipayBindAni::AlipayBindAni(AlipayPresenter *presenter) { @@ -63,6 +74,12 @@ AlipayBindAni::~AlipayBindAni() delete alipayImageAni; alipayImageAni = nullptr; } + if (alipaylogImage != nullptr) { + delete alipaylogImage; + alipaylogImage = nullptr; + } + + } bool AlipayBindAni::AlipayInitLabel(void) @@ -77,7 +94,7 @@ bool AlipayBindAni::AlipayInitLabel(void) alipayLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, ANILABEL_FONT_FIRST); alipayLabel->SetStyle(STYLE_TEXT_FONT, ANILABEL_FONT_FIRST); alipayLabel->SetAlign(TEXT_ALIGNMENT_CENTER); - alipayLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); + alipayLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); Add(alipayLabel); return true; } @@ -98,14 +115,23 @@ bool AlipayBindAni::AlipayInitImageAni(void) searchImageInfo[i].height = ALIPAY_BIND_IMAGE_HEIGHT; } - alipayImageAni->SetPosition(RES_IMAGE_X, RES_IMAGE_Y, RES_IMAGE_WIDTH, RES_IMAGE_HEIGHT); + alipayImageAni->SetPosition(ALIPAY_BIND_IMAGE_X, ALIPAY_BIND_IMAGE_Y, ALIPAY_BIND_IMAGE_WIDTH, ALIPAY_BIND_IMAGE_HEIGHT); alipayImageAni->SetImageAnimatorSrc(searchImageInfo, ALIPAY_BIND_SEARCH_IMAGE_NUM, ALIPAY_BIND_IMAGE_DELAY); alipayImageAni->SetRepeat(true); alipayImageAni->SetAutoEnable(false); - alipayImageAni->SetResizeMode(UIImageView::FILL); + //alipayImageAni->SetResizeMode(UIImageView::FILL); Add(alipayImageAni); - alipayImageAni->Start(); + + alipaylogImage = new UIImageView(); + if (alipaylogImage == nullptr) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindRes::AlipayInitImage new alipayImage fail"); + return false; + } + alipaylogImage->SetPosition(143, 130, 180, 180); + alipaylogImage->SetSrc(PNG_LOG_PATH); + Add(alipaylogImage); + return true; } @@ -115,7 +141,7 @@ bool AlipayBindAni::InitView() SetDraggable(true); SetTouchable(true); SetOnDragListener(presenter_); - SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); + SetPosition(0, 0, 466, 466); if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindAni::InitView AlipayInitLabel() false"); return false; diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindRes.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindRes.cpp index 0a331982b..e9c7c6448 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindRes.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayBindRes.cpp @@ -14,19 +14,20 @@ #include "AlipayModel.h" namespace OHOS { -static const int16 EXIT_LABEL_X_FIRST = 151; -static const int16 EXIT_LABEL_Y_FIRST = 257; -static const int16 EXIT_LABEL_WIDTH_FIRST = 151; -static const int16 EXIT_LABEL_HEIGHT_FIRST = 48; +static const int16 EXIT_LABEL_X_FIRST = 83; +static const int16 EXIT_LABEL_Y_FIRST = 350; + +static const int16 EXIT_LABEL_WIDTH_FIRST = 300; +static const int16 EXIT_LABEL_HEIGHT_FIRST = 50; static const char *EXIT_LABEL_TEXT_FIRST = (char *)"绑定失败"; -static const int16 EXIT_LABEL_FONT_FIRST = 38; +static const int16 EXIT_LABEL_FONT_FIRST = 35; static const char *EXIT_LABEL_TEXT_SEC = (char *)"绑定成功"; -static const int16 RES_IMAGE_X = 161; -static const int16 RES_IMAGE_Y = 110; -static const int16 RES_IMAGE_WIDTH = 135; -static const int16 RES_IMAGE_HEIGHT = 135; +static const int16 RES_IMAGE_X = 153; +static const int16 RES_IMAGE_Y = 140; +static const int16 RES_IMAGE_WIDTH = 160; +static const int16 RES_IMAGE_HEIGHT = 160; AlipayBindRes::AlipayBindRes(AlipayPresenter *presenter) { @@ -61,10 +62,10 @@ void AlipayBindRes::AlipayRefreshBindRes(void) // alipayLabel->Set if (presenter_->AlipayGetBindFlag()) { alipayLabel->SetText(EXIT_LABEL_TEXT_SEC); - alipayImage->SetSrc(PNG_ALIPAY_BIND_SUCCESS); + alipayImage->SetSrc(PNG_ALIPAY_YSE_ICON); } else { alipayLabel->SetText(EXIT_LABEL_TEXT_FIRST); - alipayImage->SetSrc(PNG_ALIPAY_BIND_FAILURE); + alipayImage->SetSrc(PNG_ALIPAY_NO_ICON); } alipayLabel->Invalidate(); alipayImage->Invalidate(); @@ -82,9 +83,9 @@ bool AlipayBindRes::AlipayInitLabel(const char *resStr) alipayLabel->SetPosition(EXIT_LABEL_X_FIRST, EXIT_LABEL_Y_FIRST, EXIT_LABEL_WIDTH_FIRST, EXIT_LABEL_HEIGHT_FIRST); alipayLabel->SetText(resStr); alipayLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, EXIT_LABEL_FONT_FIRST); - alipayLabel->SetStyle(STYLE_TEXT_FONT, EXIT_LABEL_FONT_FIRST); - alipayLabel->SetAlign(TEXT_ALIGNMENT_CENTER); - alipayLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); + //alipayLabel->SetStyle(STYLE_TEXT_FONT, EXIT_LABEL_FONT_FIRST); + alipayLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); + alipayLabel->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); Add(alipayLabel); @@ -103,7 +104,7 @@ bool AlipayBindRes::AlipayInitImage(const char *imageSrc) // Set additional property alipayImage->SetAutoEnable(false); - alipayImage->SetResizeMode(UIImageView::FILL); + //alipayImage->SetResizeMode(UIImageView::FILL); Add(alipayImage); return true; @@ -115,14 +116,14 @@ bool AlipayBindRes::InitView() SetDraggable(true); SetTouchable(true); SetOnDragListener(presenter_); - SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); + SetPosition(0, 0, 466, 466); const char *resStr = EXIT_LABEL_TEXT_SEC; if (!AlipayInitLabel(resStr)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindRes::InitView AlipayInitLabel() false"); return false; } - if (!AlipayInitImage(PNG_ALIPAY_BIND_SUCCESS)) { + if (!AlipayInitImage(PNG_ALIPAY_YSE_ICON)) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayBindRes::InitView AlipayInitImage() false"); return false; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayExitBind.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayExitBind.cpp index edf88e323..2f9bf47d9 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayExitBind.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayExitBind.cpp @@ -12,33 +12,37 @@ #include "AlipayExitBind.h" namespace OHOS { -static const int16 EXIT_LABEL_X_FIRST = 132; -static const int16 EXIT_LABEL_X_SEC = 0; -static const int16 EXIT_LABEL_WIDTH_FIRST = 189; -static const int16 EXIT_LABEL_HEIGHT_FIRST = 48; - -static const int16 EXIT_LABEL_Y_FIRST = 57; -static const int16 EXIT_LABEL_Y_SECOND = 154; -static const int16 EXIT_LABEL_WIDTH_SEC = 454; -static const int16 EXIT_LABEL_HEIGHT_SEC = 83; -static const int16 EXIT_LABEL_FONT_FIRST = 38; + +static const int16 EXIT_LABEL_X_FIRST = 83; +static const int16 EXIT_LABEL_X_SEC = 53; + +static const int16 EXIT_LABEL_WIDTH_FIRST = 300; +static const int16 EXIT_LABEL_HEIGHT_FIRST = 35; + +static const int16 EXIT_LABEL_Y_FIRST = 50; +static const int16 EXIT_LABEL_Y_SECOND = 222; + +static const int16 EXIT_LABEL_WIDTH_SEC = 360; +static const int16 EXIT_LABEL_HEIGHT_SEC = 70; + +static const int16 EXIT_LABEL_FONT_FIRST = 30; static const int16 EXIT_LABEL_FONT_SEC = 30; static const char *EXIT_LABEL_TEXT_FIRST = (char *)"未完成绑定"; -static const char *EXIT_LABEL_TEXT_SECOND = (char *)"当前未完成绑定,退出在进来\n需要重新扫码绑定"; +static const char *EXIT_LABEL_TEXT_SECOND = (char *)"当前未完成绑定,退出在进来需要重新扫码绑定"; -static const int16 EXIT_BUTTON_EXIT_X = 50; -static const int16 EXIT_BUTTON_EXIT_Y = 312; +static const int16 EXIT_BUTTON_EXIT_X = 58; +static const int16 EXIT_BUTTON_EXIT_Y = 320; -static const int16 EXIT_BUTTON_BIND_X = 233; -static const int16 EXIT_BUTTON_BIND_Y = 312; +static const int16 EXIT_BUTTON_BIND_X = 238; +static const int16 EXIT_BUTTON_BIND_Y = 320; static const char *EXIT_BUTTON_TEXT_FIRST = (char *)"退出"; static const char *EXIT_BUTTON_TEXT_SECOND = (char *)"去绑定"; -static const int16 EXIT_BUTTON_WIDTH = 169; -static const int16 EXIT_BUTTON_HEIGHT = 73; -static const int16 EXIT_BUTTON_FONT = 38; +static const int16 EXIT_BUTTON_WIDTH = 170; +static const int16 EXIT_BUTTON_HEIGHT = 90; +static const int16 EXIT_BUTTON_FONT = 26; AlipayExitBind::AlipayExitBind(AlipayPresenter *presenter) { @@ -62,6 +66,11 @@ AlipayExitBind::~AlipayExitBind() alipayButton[buttonNum] = nullptr; } } + if(AttentionImage) + { + delete AttentionImage; + AttentionImage =nullptr; + } } bool AlipayExitBind::AlipayInitLabel() @@ -78,7 +87,7 @@ bool AlipayExitBind::AlipayInitLabel() alipayLabel[ALIPAY_SET_ZERO]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, EXIT_LABEL_FONT_FIRST); alipayLabel[ALIPAY_SET_ZERO]->SetStyle(STYLE_TEXT_FONT, EXIT_LABEL_FONT_FIRST); alipayLabel[ALIPAY_SET_ZERO]->SetAlign(TEXT_ALIGNMENT_CENTER); - alipayLabel[ALIPAY_SET_ZERO]->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); + alipayLabel[ALIPAY_SET_ZERO]->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); Add(alipayLabel[ALIPAY_SET_ZERO]); @@ -91,12 +100,23 @@ bool AlipayExitBind::AlipayInitLabel() EXIT_LABEL_HEIGHT_SEC); alipayLabel[ALIPAY_SET_ONE]->SetText(EXIT_LABEL_TEXT_SECOND); alipayLabel[ALIPAY_SET_ONE]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, EXIT_LABEL_FONT_SEC); - alipayLabel[ALIPAY_SET_ONE]->SetStyle(STYLE_LINE_SPACE, 6); - alipayLabel[ALIPAY_SET_ONE]->SetStyle(STYLE_TEXT_FONT, EXIT_LABEL_FONT_SEC); + //alipayLabel[ALIPAY_SET_ONE]->SetStyle(STYLE_LINE_SPACE, 12); + //alipayLabel[ALIPAY_SET_ONE]->SetStyle(STYLE_TEXT_FONT, EXIT_LABEL_FONT_SEC); + alipayLabel[ALIPAY_SET_ONE]->SetTextColor(Color::GetColorFromRGBA(0xAA, 0xAA, 0xAA, 0xFF)); alipayLabel[ALIPAY_SET_ONE]->SetAlign(TEXT_ALIGNMENT_CENTER); - alipayLabel[ALIPAY_SET_ONE]->SetLineBreakMode(UILabel::LINE_BREAK_ELLIPSIS); + alipayLabel[ALIPAY_SET_ONE]->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); Add(alipayLabel[ALIPAY_SET_ONE]); + AttentionImage=new UIImageView(); + if (AttentionImage == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new FactoryResetImage fail!"); + return false; + } + AttentionImage->SetPosition(193, 110); + AttentionImage->SetSrc(PNG_ATTENTION_IMAGE); + Add(AttentionImage); + return true; } @@ -111,11 +131,12 @@ bool AlipayExitBind::InitSimilarButton(int16 num, int16 alipayX, int16 alipayY, int64_t backColor = 0; if (num == 0) { - backColor = 0xff4a83bf; - alipayButton[num]->SetTextColor(Color::GetColorFromRGBA(0x00, 0x00, 0x00, 0xff)); - alipayButton[num]->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff); + backColor = 0xff191919; + //alipayButton[num]->SetTextColor(Color::GetColorFromRGBA(0x19, 0x19, 0x19, 0x19)); + alipayButton[num]->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); } else if (num == 1) { - backColor = 0xff0b1928; + backColor = 0xff0176ff; + alipayButton[num]->SetStyle(STYLE_BACKGROUND_COLOR, 0xff0176ff); } alipayButton[num]->SetPosition(alipayX, alipayY, EXIT_BUTTON_WIDTH, EXIT_BUTTON_HEIGHT); alipayButton[num]->SetText(buttonStr); diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPayCode.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPayCode.cpp index 79e738f0f..80f52fa27 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPayCode.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayPayCode.cpp @@ -204,7 +204,7 @@ bool AlipayPayCode::InitView() SetOnDragListener(presenter_); SetPosition(0, 0, HORIZONTAL_RESOLUTION, VERTICAL_RESOLUTION); SetStyle(STYLE_BACKGROUND_COLOR, 0xff1677ff); - SetStyle(STYLE_BACKGROUND_OPA, 0xff); + //SetStyle(STYLE_BACKGROUND_OPA, 0xff); if (!AlipayInitLabel()) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayPayCode::InitView AlipayInitLabel() false"); diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbind.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbind.cpp index 2c081cae3..eb68174d8 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbind.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbind.cpp @@ -13,34 +13,35 @@ #include "AlipayUnbind.h" namespace OHOS { -static const int16 EXIT_LABEL_X_FIRST = 132; -static const int16 EXIT_LABEL_Y_FIRST = 57; -static const int16 EXIT_LABEL_WIDTH_FIRST = 189; -static const int16 EXIT_LABEL_HEIGHT_FIRST = 48; +static const int16 EXIT_LABEL_X_FIRST = 83; +static const int16 EXIT_LABEL_Y_FIRST = 50; +static const int16 EXIT_LABEL_WIDTH_FIRST = 300; +static const int16 EXIT_LABEL_HEIGHT_FIRST = 35; -static const int16 EXIT_LABEL_X_SEC = 44; -static const int16 EXIT_LABEL_Y_SECOND = 126; -static const int16 EXIT_LABEL_WIDTH_SEC = 365; -static const int16 EXIT_LABEL_HEIGHT_SEC = 128; +static const int16 EXIT_LABEL_X_SEC = 53; +static const int16 EXIT_LABEL_Y_SECOND = 222; -static const int16 EXIT_LABEL_FONT_FIRST = 38; +static const int16 EXIT_LABEL_WIDTH_SEC = 360; +static const int16 EXIT_LABEL_HEIGHT_SEC = 70; + +static const int16 EXIT_LABEL_FONT_FIRST = 30; static const int16 EXIT_LABEL_FONT_SEC = 30; static const char *UNBIND_LABEL_TEXT_FIRST = (char *)"解除绑定"; static const char *UNBIND_LABEL_TEXT_SECOND = (char *)"解绑后将无法使用支付宝各项解锁功能,确认解绑?"; -static const int16 EXIT_BUTTON_EXIT_X = 50; -static const int16 EXIT_BUTTON_EXIT_Y = 312; +static const int16 EXIT_BUTTON_EXIT_X = 58; +static const int16 EXIT_BUTTON_EXIT_Y = 320; -static const int16 EXIT_BUTTON_BIND_X = 233; -static const int16 EXIT_BUTTON_BIND_Y = 312; +static const int16 EXIT_BUTTON_BIND_X = 238; +static const int16 EXIT_BUTTON_BIND_Y = 320; static const char *UNBIND_BUTTON_TEXT_FIRST = (char *)"确认"; static const char *UNBIND_BUTTON_TEXT_SECOND = (char *)"取消"; -static const int16 EXIT_BUTTON_WIDTH = 169; -static const int16 EXIT_BUTTON_HEIGHT = 73; -static const int16 EXIT_BUTTON_FONT = 38; +static const int16 EXIT_BUTTON_WIDTH = 170; +static const int16 EXIT_BUTTON_HEIGHT = 90; +static const int16 EXIT_BUTTON_FONT = 26; AlipayUnbind::AlipayUnbind(AlipayPresenter *presenter) { @@ -64,6 +65,11 @@ AlipayUnbind::~AlipayUnbind() alipayButton[buttonNum] = nullptr; } } + if(AttentionImage) + { + delete AttentionImage; + AttentionImage =nullptr; + } } bool AlipayUnbind::AlipayInitLabel() @@ -80,7 +86,7 @@ bool AlipayUnbind::AlipayInitLabel() alipayLabel[ALIPAY_SET_ZERO]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, EXIT_LABEL_FONT_FIRST); alipayLabel[ALIPAY_SET_ZERO]->SetStyle(STYLE_TEXT_FONT, EXIT_LABEL_FONT_FIRST); alipayLabel[ALIPAY_SET_ZERO]->SetAlign(TEXT_ALIGNMENT_CENTER); - alipayLabel[ALIPAY_SET_ZERO]->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); + alipayLabel[ALIPAY_SET_ZERO]->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); Add(alipayLabel[ALIPAY_SET_ZERO]); @@ -93,11 +99,25 @@ bool AlipayUnbind::AlipayInitLabel() EXIT_LABEL_HEIGHT_SEC); alipayLabel[ALIPAY_SET_ONE]->SetText(UNBIND_LABEL_TEXT_SECOND); alipayLabel[ALIPAY_SET_ONE]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, EXIT_LABEL_FONT_SEC); - alipayLabel[ALIPAY_SET_ONE]->SetStyle(STYLE_LINE_SPACE, 12); - alipayLabel[ALIPAY_SET_ONE]->SetStyle(STYLE_TEXT_FONT, EXIT_LABEL_FONT_SEC); + //alipayLabel[ALIPAY_SET_ONE]->SetStyle(STYLE_LINE_SPACE, 12); + //alipayLabel[ALIPAY_SET_ONE]->SetStyle(STYLE_TEXT_FONT, EXIT_LABEL_FONT_SEC); + alipayLabel[ALIPAY_SET_ONE]->SetTextColor(Color::GetColorFromRGBA(0xAA, 0xAA, 0xAA, 0xFF)); + alipayLabel[ALIPAY_SET_ONE]->SetAlign(TEXT_ALIGNMENT_CENTER); alipayLabel[ALIPAY_SET_ONE]->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); Add(alipayLabel[ALIPAY_SET_ONE]); + AttentionImage=new UIImageView(); + if (AttentionImage == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SystemFactoryResetView::new FactoryResetImage fail!"); + return false; + } + AttentionImage->SetPosition(193, 110); + AttentionImage->SetSrc(PNG_ATTENTION_IMAGE); + Add(AttentionImage); + + + return true; } @@ -110,11 +130,12 @@ bool AlipayUnbind::InitSimilarButton(int16 num, int16 alipayX, int16 alipayY, co } int64_t backColor = 0; if (num == 0) { - backColor = 0xff4a83bf; - alipayButton[num]->SetTextColor(Color::GetColorFromRGBA(0x00, 0x00, 0x00, 0xff)); - alipayButton[num]->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff); + backColor = 0xff191919; + //alipayButton[num]->SetTextColor(Color::GetColorFromRGBA(0x19, 0x19, 0x19, 0x19)); + alipayButton[num]->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); } else if (num == 1) { - backColor = 0xff0b1928; + backColor = 0xff0176ff; + alipayButton[num]->SetStyle(STYLE_BACKGROUND_COLOR, 0xff0176ff); } alipayButton[num]->SetPosition(alipayX, alipayY, EXIT_BUTTON_WIDTH, EXIT_BUTTON_HEIGHT); alipayButton[num]->SetText(buttonStr); diff --git a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbindFinish.cpp b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbindFinish.cpp index 817d90bf3..2bbfe63d0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbindFinish.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alipay/src/AlipayUnbindFinish.cpp @@ -79,20 +79,21 @@ bool AlipayUnbindFinish::AlipayInitLabel(void) Add(titleUnbind); - titleUnbind = new UILabel(); - if (titleUnbind == nullptr) { + textUnbind = new UILabel(); + if (textUnbind == nullptr) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "AlipayUnbindFinish::AlipayInitLabel new label fail"); return false; } - titleUnbind->SetText(UNBIND_FINISH_TEXT); - titleUnbind->SetFont(DEFAULT_VECTOR_FONT_FILENAME, UNBIND_FINISH_TEXT_FONT); - titleUnbind->SetPosition(UNBIND_FINISH_TEXT_X, UNBIND_FINISH_TEXT_Y, UNBIND_FINISH_TEXT_WIDTH, + textUnbind->SetText(UNBIND_FINISH_TEXT); + textUnbind->SetFont(DEFAULT_VECTOR_FONT_FILENAME, UNBIND_FINISH_TEXT_FONT); + textUnbind->SetPosition(UNBIND_FINISH_TEXT_X, UNBIND_FINISH_TEXT_Y, UNBIND_FINISH_TEXT_WIDTH, UNBIND_FINISH_TEXT_HEIGHT); - titleUnbind->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); - titleUnbind->SetStyle(STYLE_TEXT_FONT, UNBIND_FINISH_TEXT_FONT); - titleUnbind->SetStyle(STYLE_LINE_SPACE, 6); - - Add(titleUnbind); + textUnbind->SetLineBreakMode(UILabel::LINE_BREAK_WRAP); + textUnbind->SetStyle(STYLE_TEXT_FONT, UNBIND_FINISH_TEXT_FONT); + textUnbind->SetStyle(STYLE_LINE_SPACE, 6); + textUnbind->SetTextColor(Color::GetColorFromRGBA(0xAA, 0xAA, 0xAA, 0xFF)); + textUnbind->SetAlign(TEXT_ALIGNMENT_CENTER); + Add(textUnbind); return true; } diff --git a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp index 0fe261e02..e6d64cbbf 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/goal/src/goalview.cpp @@ -265,7 +265,7 @@ namespace OHOS stepAnimatorView->SetPosition(183, 90, 100, 100); stepAnimatorView->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff); stepAnimatorView->SetStyle(STYLE_BACKGROUND_OPA, 0xff); - stepAnimatorView->SetImageAnimatorSrc(goalAnimatorInfo, 20, 100); + stepAnimatorView->SetImageAnimatorSrc(goalAnimatorInfo, 20, 50); stepAnimatorView->SetRepeat(true); stepAnimatorView->Start(); } diff --git a/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBindAni.h b/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBindAni.h index ea2cc5820..6f29d87c3 100644 --- a/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBindAni.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayBindAni.h @@ -30,6 +30,7 @@ private: UILabel *alipayLabel { nullptr }; UIImageAnimatorView *alipayImageAni { nullptr }; ImageAnimatorInfo searchImageInfo[ALIPAY_BIND_SEARCH_IMAGE_NUM]; + }; } #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayUnbind.h b/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayUnbind.h index 183b8066e..c77eaf4ab 100644 --- a/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayUnbind.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/alipay/include/AlipayUnbind.h @@ -27,6 +27,7 @@ private: AlipayPresenter *presenter_; UILabel *alipayLabel[ALIPAY_SET_TWO] { nullptr }; UILabelButton *alipayButton[ALIPAY_SET_TWO] { nullptr }; + }; } #endif \ No newline at end of file diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/1.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/1.bin new file mode 100644 index 000000000..76ebc1dfd --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/1.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78107b4519e57b5b0737d21dd855c8786e77111afd1c5b50e4d2d5b817ac0c1b +size 4504 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/2.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/2.bin new file mode 100644 index 000000000..54a024965 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/2.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9125b84c19b07ebca138b1fa49bd049f48ed5f138bfc4e63b61bf15db987ddf3 +size 4504 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/3.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/3.bin new file mode 100644 index 000000000..a13dd2017 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/3.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:96e04fd4696ece9f971938c0272f00257266d8b6899cc9ea3371d548da260693 +size 4504 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/4.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/4.bin new file mode 100644 index 000000000..5b004520b --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/4.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:966f76cc73a4ec2539ee6c7f7b511727a67f5d95e8e0b86f916179f5a147e9be +size 4504 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/5.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/5.bin new file mode 100644 index 000000000..f746a1986 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/5.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8ec36638755327980836b2301d13d446b14a6fba50a9e7dc7860bb2055b3837 +size 4504 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/6.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/6.bin new file mode 100644 index 000000000..bb782ee49 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/6.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a12da421c595cbc68b804765d588475a809816eef094527a5b07eea4a285f232 +size 4504 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/7.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/7.bin new file mode 100644 index 000000000..49b1649a1 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/7.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1475fc806f229e115db4a0729f264ddc5471ca719b8ec6f90a467b4d20779dc7 +size 4504 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/8.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/8.bin new file mode 100644 index 000000000..0a91818cf --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/8.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b203f3874ac14c642e06e233852fa40e16da3f8c847bc5adc878ba9402c89192 +size 4504 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/alipaylog.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/alipaylog.bin new file mode 100644 index 000000000..7801d8e79 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/alipaylog.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:490be57f49cf691f45736cb377ea1e298ada45cb11555c8f3c6d5f06abf186b8 +size 21624 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/no.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/no.bin new file mode 100644 index 000000000..391096c7d --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/no.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c3b9af150e162e1e19aea6c066844a4c159d8732bea5e85b79c0f3b36fb9085 +size 17304 diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/yes.bin b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/yes.bin new file mode 100644 index 000000000..eee475c90 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/res/alipay/yes.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbd44def8b0cb27f86809721c75367d505233a50de9930a4a6bfae02c29566ba +size 17304 -- 2.17.1