* @Author: luozheng 1732036298@qq.com
* @Date: 2024-07-18 14:26:08
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-07-27 12:55:14
+ * @LastEditTime: 2024-07-31 10:08:26
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/rebootandshutdown/src/RebootAndShutdownView.cpp
*/
#include "rebootandshutdown/include/RebootAndShutdownPresenter.h"
#include "rebootandshutdown/include/RebootAndShutdownView.h"
+#include "ConfigModel.h"
#include "wearable_log.h"
#include "ui_resource_string.h"
#include "UiConfig.h"
label->SetPosition(labelconfig.left, labelconfig.top, labelconfig.width, labelconfig.height);
label->SetStyle(STYLE_TEXT_FONT, labelconfig.fontSize);
label->SetStyle(STYLE_LINE_HEIGHT, labelconfig.lineHeigh);
- label->SetTextId(labelconfig.textId);
+ if (true == ConfigModel::GetInstance()->GetisFirstTimeStart() && ConfigModel::GetInstance()->GetLanguage() == -1)
+ {
+ label->SetText(labelconfig.text);
+ }
+ else
+ {
+ label->SetTextId(labelconfig.textId);
+ }
label->SetLineBreakMode(labelconfig.lineBreakMode);
label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
label->SetRollSpeed(70);
.fontSize = 30,
.lineHeigh = 35,
.textId = STR_SLIDE_TO_SHUTDOWN, /*滑动关机 >>*/
+ .text = "Slide to shutdown",
.lineBreakMode = UILabel::LINE_BREAK_OSCILLATION,
};
shutdownLabel = RebootAndShutdownLabelInit(labelConfig);
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "shutdownLabel new fail!");
return false;
}
+ shutdownLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);
shutdownLabel->SetTextColor(Color::GetColorFromRGBA(0x66, 0x66, 0x66, 0xff));
/* -------------------------------------------------------------------------- */
labelConfig.textId = STR_SLIDE_TO_REBOOT; /*滑动重启 >>*/
+ labelConfig.text = "Slide to reboot";
rebootLabel = RebootAndShutdownLabelInit(labelConfig);
if (rebootLabel == nullptr)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "rebootLabel new fail!");
return false;
}
+ rebootLabel->SetAlign(TEXT_ALIGNMENT_LEFT, TEXT_ALIGNMENT_CENTER);
rebootLabel->SetTextColor(Color::GetColorFromRGBA(0x66, 0x66, 0x66, 0xff));
/* -------------------------------------------------------------------------- */
labelConfig = {
return false;
}
factoryResetLabel->SetViewId(FACTORYRESET_LABEL_VIEWID);
- factoryResetLabel->SetTouchable(true);
+ factoryResetLabel->SetTouchable((ConfigModel::GetInstance()->GetisFirstTimeStart() && ConfigModel::GetInstance()->GetLanguage() == -1) ? false : true);
factoryResetLabel->SetTextColor(Color::GetColorFromRGBA(0x35, 0x49, 0xff, 0xff));
- factoryResetLabel->SetStyle(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_TOP);
factoryResetLabel->SetOnClickListener(presenter_);
return true;