* @Author: luozheng 1732036298@qq.com
* @Date: 2024-03-30 09:14:38
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-02 20:04:15
+ * @LastEditTime: 2024-04-23 19:24:51
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/include/SettingItemView.h
*/
/*
#include "UiConfig.h"
#include "SettingModel.h"
#include "components/ui_label_button_ext.h"
+#include "components/ui_label_ext.h"
#include "components/ui_image_view.h"
namespace OHOS
{
private:
SettingItemView(const SettingItemView &);
UIImageView Icon;
+ UILabelExt settingLabelExt;
UILabelButtonExt settingLabelButtonExt;
SettingItem sItemInfo = {SETTING_ITEM_ZERO, nullptr, STR_EXERCISE_GENERAL, false};
};
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-03-27 19:48:49
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-04-03 14:11:23
+ * @LastEditTime: 2024-04-23 19:26:32
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/settings/src/SettingItemView.cpp
*/
SetTouchable(true);
SetUpChild();
Add(&settingLabelButtonExt);
+ Add(&settingLabelExt);
Add(&Icon);
}
SettingItemView::~SettingItemView()
{
Remove(&settingLabelButtonExt);
+ Remove(&settingLabelExt);
Remove(&Icon);
}
sItemInfo = itemInfo;
Icon.SetSrc(itemInfo.icon);
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%d", itemInfo.textId);
- settingLabelButtonExt.SetTextId(itemInfo.textId);
+ settingLabelExt.SetTextId(itemInfo.textId);
}
void SettingItemView::SetUpChild()
Icon.SetPosition(SETTING_ICON_X, SETTING_SICON_Y);
Icon.SetStyle(STYLE_IMAGE_OPA, OPA_OPAQUE);
+ settingLabelExt.SetPosition(115, 33,180,100);
+ settingLabelExt.SetStyle(STYLE_TEXT_FONT, 30);
+ settingLabelExt.SetStyle(STYLE_LINE_HEIGHT, 35);
+ settingLabelExt.SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
+ settingLabelExt.SetRollSpeed(40);
+ settingLabelExt.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);
+
settingLabelButtonExt.SetPosition(0, 0, 380, 100);
settingLabelButtonExt.SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
settingLabelButtonExt.SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30);