* @Author: luozheng 1732036298@qq.com
* @Date: 2024-04-23 17:29:18
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-23 18:03:26
+ * @LastEditTime: 2024-05-06 17:48:35
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/include/MotionRecognitionView.h
*/
#ifndef MOTION_RECOGNITION_VIEW_H
void MotionRecognitionViewInit(void);
void ClearAll(void);
UIScrollView *scrollView = nullptr;
- UILabel *Title = nullptr;
+ UILabelExt *Title = nullptr;
UIImageView *MotionRecognitionImage = nullptr;
- UILabel *MotionRecognitionLabel = nullptr;
+ UILabelExt *MotionRecognitionLabel = nullptr;
UIToggleButton *MotionRecognitionToggleButton = nullptr;
};
}
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-04-23 17:28:52
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-24 14:26:44
+ * @LastEditTime: 2024-05-06 17:52:26
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/motionrecognition/src/MotionRecognitionView.cpp
*/
#include "motionrecognition/include/MotionRecognitionPresenter.h"
}
scrollView->SetOnDragListener(draglistener);
/* -------------------------------------------------------------------------- */
+ Title = new UILabelExt();
if (Title == nullptr)
{
- Title = new UILabel();
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MotionRecognitionView::Title can not be nullptr!");
+ return;
}
Title->SetPosition(83, 50, 300, 40);
Title->SetStyle(STYLE_TEXT_FONT, 30);
Title->SetStyle(STYLE_LINE_HEIGHT, 35);
- Title->SetText("运动识别");
+ //Title->SetText("运动识别");
+ Title->SetTextId(STR_MOTION_RECOGNITION);
Title->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
Title->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
- Title->SetRollSpeed(40);
+ //Title->SetRollSpeed(40);
Title->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
Title->SetVisible(true);
/* -------------------------------------------------------------------------- */
MotionRecognitionImage->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
MotionRecognitionImage->SetStyle(STYLE_BORDER_RADIUS, 100);
/* -------------------------------------------------------------------------- */
+ MotionRecognitionLabel = new UILabelExt();
if (MotionRecognitionLabel == nullptr)
{
- MotionRecognitionLabel = new UILabel();
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MotionRecognitionView::MotionRecognitionLabel can not be nullptr!");
+ return;
}
MotionRecognitionLabel->SetPosition(90, 153, 180, 40);
MotionRecognitionLabel->SetStyle(STYLE_TEXT_FONT, 30);
MotionRecognitionLabel->SetStyle(STYLE_LINE_HEIGHT, 35);
- MotionRecognitionLabel->SetText("自动识别");
+ //MotionRecognitionLabel->SetText("自动识别");
+ MotionRecognitionLabel->SetTextId(STR_AUTO_DETECT);
MotionRecognitionLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
- MotionRecognitionLabel->SetRollSpeed(40);
+ //MotionRecognitionLabel->SetRollSpeed(40);
MotionRecognitionLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
/* -------------------------------------------------------------------------- */
MotionRecognitionToggleButton = new UIToggleButton();