消息:修复消息详情界面显示不完全的按键
authorCaisking <3449750381@qq.com>
Sat, 5 Oct 2024 09:03:26 +0000 (17:03 +0800)
committerCaisking <3449750381@qq.com>
Sat, 5 Oct 2024 09:03:26 +0000 (17:03 +0800)
code/sdk/application/wearable/fd230app/nativeui/message/include/MessageShowView.h
code/sdk/application/wearable/fd230app/nativeui/message/src/MessageShowView.cpp

index d8bdf8c..8d13f06 100644 (file)
@@ -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;
index abb9c33..8585c26 100644 (file)
@@ -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)
     {