From: Caisking <3449750381@qq.com> Date: Sat, 5 Oct 2024 09:03:26 +0000 (+0800) Subject: 消息:修复消息详情界面显示不完全的按键 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=0c0bd76abe26ebcea5dfbc117009de47e05466ca;p=mirrors%2FFD230.git 消息:修复消息详情界面显示不完全的按键 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/message/include/MessageShowView.h b/code/sdk/application/wearable/fd230app/nativeui/message/include/MessageShowView.h index d8bdf8c26..8d13f06f2 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/message/include/MessageShowView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/message/include/MessageShowView.h @@ -1,15 +1,4 @@ -/*** - * @Date: 2024-06-21 09:56:18 - * @LastEditors: Caisking 3449750381@qq.com - * @LastEditTime: 2024-08-12 16:03:32 - * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/message/include/MessageShowView.h - */ -/*** - * @Date: 2024-06-21 09:56:18 - * @LastEditors: Caisking 3449750381@qq.com - * @LastEditTime: 2024-08-09 18:56:33 - * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/message/include/MessageShowView.h - */ + #ifndef MessageShow_VIEW_H #define MessageShow_VIEW_H @@ -63,6 +52,8 @@ namespace OHOS UILabelButton *messageButton{nullptr}; // 消息 UILabelButtonExt *deleteButton{nullptr}; // 清除按键 + UIImageView *background{nullptr}; + bool viewInitStatus{false}; std::string titleStr; std::string timeStr; diff --git a/code/sdk/application/wearable/fd230app/nativeui/message/src/MessageShowView.cpp b/code/sdk/application/wearable/fd230app/nativeui/message/src/MessageShowView.cpp index abb9c33cc..8585c26d0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/message/src/MessageShowView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/message/src/MessageShowView.cpp @@ -82,6 +82,9 @@ namespace OHOS delete deleteButton; deleteButton = nullptr; + + delete background; + background = nullptr; } void MessageShowView::InitializeLabel(UILabel *label, int posX, int posY, int width, int height, const char *viewId, int fontSize) @@ -141,6 +144,12 @@ namespace OHOS messageButton->SetPosition(33, 157, 380, updatedRectWidth); deleteButton->SetPosition(43, 157 + updatedRectWidth + 20, 380, 100); + /*加载空白*/ + CreateLine(background, 43, 157 + updatedRectWidth + 20 + 50, 380, 100, + "line"); + background->SetVisible(false); + container_->Add(background); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "updatedRectWidth %d updatedLabelWidth %d lines %d \r\n", updatedRectWidth, updatedLabelWidth, lines); } void MessageShowView::InitView() @@ -202,6 +211,7 @@ namespace OHOS container_->Add(deleteButton); /* -------------------------------------------------------------------------- */ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "InitView is ok!"); + // UpdateMessage(); } @@ -217,7 +227,7 @@ namespace OHOS titleStr = data->labelTitle; timeStr = data->labelTime; messageStr = data->labelDetails; - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UpdateMessage title %s time %s message %s", titleStr.c_str(), timeStr.c_str(), messageStr.c_str()); + WEARABLE_LOGED(WEARABLE_LOG_MODULE_APP, "UpdateMessage title %s time %s message %s", titleStr.c_str(), timeStr.c_str(), messageStr.c_str()); } void MessageShowView::PreLoad(void) {