传输界面增加提示 #668
authorhcj <1224667075@qq.com>
Fri, 13 Sep 2024 07:58:44 +0000 (15:58 +0800)
committerhcj <1224667075@qq.com>
Fri, 13 Sep 2024 07:58:44 +0000 (15:58 +0800)
code/sdk/application/wearable/fd230app/nativeui/makephone/src/CallingView.cpp
code/sdk/application/wearable/service/msg_center/src/notify/transmitting.cpp
code/sdk/drivers/peripheral/utils/custom_utils_at_cmd.c

index 321c245..6e89244 100644 (file)
@@ -372,7 +372,7 @@ bool CallingView::Initshowdial()
 
             labelButton[showdial_i]->SetText(dial_id_str[showdial_i]);
             labelButton[showdial_i]->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 40);
-            labelButton[showdial_i]->SetStyleForState(STYLE_BORDER_COLOR, 0xff191919, UIButton::PRESSED);
+            labelButton[showdial_i]->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff191919, UIButton::PRESSED);
 
             dial_group->Add(labelButton[showdial_i]);
             labelButton[showdial_i]->SetVisible(true);
index c0b6bde..b245d14 100644 (file)
@@ -212,6 +212,27 @@ namespace OHOS
         updatasider->SetTouchable(false);
         updatasider->SetValue(0);
         UIViewGroup_transmitting->Add(updatasider);
+
+
+         if (label_ == nullptr) {
+        label_ = new UILabel();
+        }
+        label_->SetPosition(60, 220);         // widget's left position and top position
+        label_->Resize(345, 101);          // widget's width and height
+        label_->SetViewId("label2");// Set style
+        label_->SetStyle(STYLE_TEXT_FONT, 30);
+
+        // Set additional property
+        label_->SetText("软件正在更新");
+        label_->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+        label_->SetTextColor(Color::GetColorFromRGBA(0xAA, 0xAA, 0xAA, 0xff));
+        label_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
+        label_->SetRollSpeed(0);
+        label_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+
+        // Add to rootView
+        UIViewGroup_transmitting->Add(label_);
+
         //Add ImageView to App
         transmitting_img = new UIImageView();
         if (transmitting_img == nullptr)
index 7c5b699..f57b5f1 100644 (file)
@@ -1036,6 +1036,7 @@ static uint32_t PBAP_LS(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 #include "dial_sos_c.h"
 #include "battery_service.h"
 #include "cywee_hal.h"
+#include "broadcast_feature.h"
 
 static uint32_t BLE_TEST(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
 {
@@ -1052,6 +1053,8 @@ static uint32_t BLE_TEST(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
      printf("BLE_TEST \n");
     #ifdef FD230
      uint8_t type =atoi( (char *)argv[0]);
+     uint8_t type_2= atoi( (char *)argv[1]);
+    
     switch (type)
     {
     case 0:
@@ -1092,7 +1095,8 @@ static uint32_t BLE_TEST(uint8_t *para, uint32_t paraLen, char *strCommonCmd)
     case 12:
         set_step_data(atoi( (char *)argv[1]));
         break;
-        
+    case 13:
+        CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,(uint8_t *)&type_2,1);
     default:
         break;
     }