From: luozheng <1732036298@qq.com> Date: Tue, 27 Feb 2024 07:36:26 +0000 (+0800) Subject: 辅助功能视图修改 X-Git-Tag: release_V1.2.70_20241020_135402~1298^2~8 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=ba5d17a77f218b17d3e3d2cdb0912a8eb375e193;p=mirrors%2FFD230.git 辅助功能视图修改 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/include/SecondaryFunctionPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/include/SecondaryFunctionPresenter.h index 9e110bf19..47e3673bc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/include/SecondaryFunctionPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/include/SecondaryFunctionPresenter.h @@ -7,8 +7,10 @@ namespace OHOS { - class SecondaryFunctionView; + static const char *SECONDARY_FUNCTION_QUICK_ACCESS_BUTTON = "SECONDARY_FUNCTION_QUICK_ACCESS_BUTTON"; // 快速访问 + static const char *SECONDARY_FUNCTION_FAST_TRAINING_BUTTON = "SECONDARY_FUNCTION_FAST_TRAINING_BUTTON"; // 快速训练 + class SecondaryFunctionView; class SecondaryFunctionPresenter : public Presenter, public UIView::OnClickListener, public UIView::OnDragListener @@ -28,6 +30,7 @@ namespace OHOS // 因为继承了OnClickListener,所以有OnClick属性,至于参数,原函数也这样直接继承; bool OnClick(UIView &view, const ClickEvent &event) override; bool OnDrag(UIView &view, const DragEvent &event) override; + bool OnDragEnd(UIView &view, const DragEvent &event) override; }; } // namespace OHOS #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/include/SecondaryFunctionView.h b/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/include/SecondaryFunctionView.h index 5fe1c76b1..7fd4473a5 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/include/SecondaryFunctionView.h +++ b/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/include/SecondaryFunctionView.h @@ -3,20 +3,37 @@ /*辅助功能*/ #include "BaseView.h" #include "View.h" - -#include "components/ui_view_group.h" +#include "components/ui_scroll_view.h" #include "components/ui_label.h" -#include "components/ui_button.h" #include "components/ui_image_view.h" +#include "components/ui_button.h" +#include "wearable_log.h" namespace OHOS { - static const char * SECONDARY_FUNCTION_BUTTON1ID = "SECONDARY_FUNCTION_BUTTON1"; - static const char * SECONDARY_FUNCTION_BUTTON2ID = "SECONDARY_FUNCTION_BUTTON2"; class SecondaryFunctionPresenter; class SecondaryFunctionView : public View { public: + struct ImageConfig + { + int16_t x; + int16_t y; + int16_t w; + int16_t h; + const char *ImageSrc; + }; + struct LabelConfig + { + int16_t left; + int16_t top; + int16_t width; + int16_t height; + int16_t fontSize; // 字体大小 + int16_t lineHeigh; // 行高 + const char *text; // 文本 + uint8_t lineBreakMode; // 断行模式。 + }; SecondaryFunctionView(); virtual ~SecondaryFunctionView(); static SecondaryFunctionView *GetInstance(void); @@ -27,18 +44,22 @@ namespace OHOS void OnStop() override; private: - void InitView(void); - void DeInitView(void); - - private: - UIViewGroup *container_ = nullptr; - UILabel *label1_ = nullptr; - UIButton *SECONDARY_FUNCTION_BUTTON1 = nullptr; - UIImageView *image3_ = nullptr; - UILabel *label2_ = nullptr; - UIButton *SECONDARY_FUNCTION_BUTTON2 = nullptr; - UIImageView *image4_ = nullptr; - UILabel *label4_ = nullptr; + void SecondaryFunctionViewInit(void); + void ClearAll(); + bool SecondaryFunctionScrollViewInit(void); + bool SecondaryFunctionScrollButtonInit(void); + bool SecondaryFunctionScrollLabelInit(void); + bool SecondaryFunctionScrollImageInit(void); + UIImageView *SetUpImageView(ImageConfig &imageconfig); // 设置图片 + UILabel *SetUpLabel(LabelConfig &labelconfig); // 设置标签 + UIScrollView *SecondaryFunctionScrollView{nullptr}; + UILabel *SecondaryFunctionScrollTitleLabel{nullptr}; // 标题 + UILabel *QuickAccessLabel{nullptr}; // 快速访问 + UILabel *FastTrainingLabel{nullptr}; // 快速训练 + UIButton *QuickAccessButton{nullptr}; + UIButton *FastTrainingButton{nullptr}; + UIImageView *Image[2]{nullptr}; + bool initViewStatus{false}; }; } // namespace OHOS #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/src/SecondaryFunctionPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/src/SecondaryFunctionPresenter.cpp index 5a36922a2..fe06f7d34 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/src/SecondaryFunctionPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/src/SecondaryFunctionPresenter.cpp @@ -1,7 +1,6 @@ #include "AppViewIDs.h" #include "NativeAbility.h" - #include "secondaryfunction/include/SecondaryFunctionPresenter.h" namespace OHOS @@ -55,31 +54,30 @@ namespace OHOS bool SecondaryFunctionPresenter::OnDrag(UIView &view, const DragEvent &event) { UNUSED(view); - if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT && - (event.GetDeltaX() > 20) && (event.GetDeltaX() > (2 * MATH_ABS(event.GetDeltaY())))) + UNUSED(event); + return false; + } + + bool SecondaryFunctionPresenter::OnDragEnd(UIView &view, const DragEvent &event) + { + if (event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) { NativeAbility::GetInstance().ChangeSlice(VIEW_SETTING); - return true; } - return false; + return true; } bool SecondaryFunctionPresenter::OnClick(UIView &view, const ClickEvent &event) { - - // 根据控件id查找是哪个控件触发了点击回调 - if (strcmp(view.GetViewId(), SECONDARY_FUNCTION_BUTTON1ID) == 0) + UNUSED(event); + if (strcmp(view.GetViewId(), SECONDARY_FUNCTION_QUICK_ACCESS_BUTTON) == 0) { - NativeAbility::GetInstance().ChangeSlice(VIEW_QUICK_ACCESS); - return true; } - else if (strcmp(view.GetViewId(), SECONDARY_FUNCTION_BUTTON2ID) == 0) + else if (strcmp(view.GetViewId(), SECONDARY_FUNCTION_FAST_TRAINING_BUTTON) == 0) { - NativeAbility::GetInstance().ChangeSlice(VIEW_FAST_TRAINING); - return true; } - return false; + return true; } } \ No newline at end of file diff --git a/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/src/SecondaryFunctionView.cpp b/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/src/SecondaryFunctionView.cpp index 7912a133d..c09f821c0 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/src/SecondaryFunctionView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/secondaryfunction/src/SecondaryFunctionView.cpp @@ -1,7 +1,6 @@ #include "secondaryfunction/include/SecondaryFunctionView.h" #include "secondaryfunction/include/SecondaryFunctionPresenter.h" - -#include "UiConfig.h" +#include "common/image_cache_manager.h" namespace OHOS { @@ -9,213 +8,249 @@ namespace OHOS SecondaryFunctionView::SecondaryFunctionView() { - + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " SecondaryFunctionView::SecondaryFunctionView"); g_pSecondaryFunctionView = this; } SecondaryFunctionView::~SecondaryFunctionView() { - DeInitView(); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " SecondaryFunctionView::~SecondaryFunctionView"); + ClearAll(); g_pSecondaryFunctionView = nullptr; } SecondaryFunctionView *SecondaryFunctionView::GetInstance() { - return g_pSecondaryFunctionView; } - void SecondaryFunctionView::InitView(void) + void SecondaryFunctionView::ClearAll(void) { - if (container_ == nullptr) + if (initViewStatus == true) { - container_ = new UIViewGroup(); - container_->SetPosition(0, 0, 466, 466); - container_->SetStyle(STYLE_BACKGROUND_OPA, 0); - UIView::OnDragListener *draglistener = static_cast(SecondaryFunctionPresenter::GetInstance()); - if (draglistener == nullptr) + SecondaryFunctionScrollView->RemoveAll(); + + delete SecondaryFunctionScrollTitleLabel; + SecondaryFunctionScrollTitleLabel = nullptr; + + delete QuickAccessLabel; + QuickAccessLabel = nullptr; + + delete FastTrainingLabel; + FastTrainingLabel = nullptr; + + delete QuickAccessButton; + QuickAccessButton = nullptr; + + delete FastTrainingButton; + FastTrainingButton = nullptr; + + for (int i = 0; i < 2; i++) { - return; + delete Image[i]; + Image[i] = nullptr; } - container_->SetOnDragListener(draglistener); - container_->SetTouchable(true); - container_->SetDraggable(true); - } - // Add Label to App - if (label1_ == nullptr) - { - label1_ = new UILabel(); + + delete SecondaryFunctionScrollView; + SecondaryFunctionScrollView = nullptr; } - label1_->SetPosition(172, 52); - label1_->SetStyle(STYLE_TEXT_FONT, 30); - label1_->SetStyle(STYLE_LINE_HEIGHT, 35); - label1_->SetText("辅助功能"); - label1_->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); - label1_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); - label1_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); - container_->Add(label1_); - label1_->SetVisible(true); - - // Add Button to App - if (SECONDARY_FUNCTION_BUTTON1 == nullptr) + } + + // 设置图片 + UIImageView *SecondaryFunctionView::SetUpImageView(ImageConfig &imageconfig) + { + UIImageView *Image = new UIImageView(); + if (Image == nullptr) { - SECONDARY_FUNCTION_BUTTON1 = new UIButton(); + return nullptr; } - SECONDARY_FUNCTION_BUTTON1->SetPosition(43, 120); - SECONDARY_FUNCTION_BUTTON1->Resize(380, 100); - SECONDARY_FUNCTION_BUTTON1->SetViewId(SECONDARY_FUNCTION_BUTTON1ID); - SECONDARY_FUNCTION_BUTTON1->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000); - SECONDARY_FUNCTION_BUTTON1->SetStyle(STYLE_BACKGROUND_OPA, 0x00); - SECONDARY_FUNCTION_BUTTON1->SetStyle(STYLE_BORDER_OPA, 0x00); - SECONDARY_FUNCTION_BUTTON1->SetStyle(STYLE_BORDER_COLOR, 0xffffffff); - SECONDARY_FUNCTION_BUTTON1->SetImageSrc(PNG_SETTING_BACKGROUND_IMAGE, nullptr); - SECONDARY_FUNCTION_BUTTON1->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xfffafafa, UIButton::PRESSED); - SECONDARY_FUNCTION_BUTTON1->SetStyleForState(STYLE_BACKGROUND_OPA, 0x00, UIButton::PRESSED); - SECONDARY_FUNCTION_BUTTON1->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); - SECONDARY_FUNCTION_BUTTON1->SetStyleForState(STYLE_BORDER_OPA, 0x00, UIButton::PRESSED); - // Add the CallBack about events - UIView::OnClickListener *button1Click = static_cast(SecondaryFunctionPresenter::GetInstance()); - SECONDARY_FUNCTION_BUTTON1->SetOnClickListener(button1Click); - // Add to rootView - container_->Add(SECONDARY_FUNCTION_BUTTON1); - SECONDARY_FUNCTION_BUTTON1->SetVisible(true); - - // Add Label to App - if (label2_ == nullptr) + Image->SetPosition(imageconfig.x, imageconfig.y, imageconfig.w, imageconfig.h); + Image->SetSrc(imageconfig.ImageSrc); + return Image; + } + + // 设置标签 + UILabel *SecondaryFunctionView::SetUpLabel(LabelConfig &labelconfig) + { + UILabel *label = new UILabel(); + if (label == nullptr) { - label2_ = new UILabel(); + return nullptr; } - label2_->SetPosition(90, 153); - label2_->SetStyle(STYLE_TEXT_FONT, 30); - label2_->SetStyle(STYLE_LINE_HEIGHT, 35); - // Set additional property - label2_->SetText("快速访问"); - label2_->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); - label2_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); - label2_->SetRollSpeed(0); - label2_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); - // Add to rootView - container_->Add(label2_); - label2_->SetVisible(true); - - // Add ImageView to App - if (image3_ == nullptr) + 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->SetText(labelconfig.text); // 内容 + label->SetLineBreakMode(labelconfig.lineBreakMode); // 断行模式。 + label->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); + label->SetFont(DEFAULT_VECTOR_FONT_FILENAME, labelconfig.fontSize); + return label; + } + + bool SecondaryFunctionView::SecondaryFunctionScrollViewInit(void) + { + SecondaryFunctionScrollView = new UIScrollView(); + if (SecondaryFunctionScrollView == nullptr) { - image3_ = new UIImageView(); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SecondaryFunctionView::SecondaryFunctionScrollView new fail!"); + return false; } - image3_->SetPosition(369, 157); - image3_->SetSrc(PNG_SETTING_NEXT_IMAGE); - // Add to rootView - container_->Add(image3_); - image3_->SetVisible(true); - - // Add Button to App - if (SECONDARY_FUNCTION_BUTTON2 == nullptr) + SecondaryFunctionScrollView->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); + UIView::OnDragListener *draglistener = static_cast(SecondaryFunctionPresenter::GetInstance()); + if (draglistener == nullptr) { - SECONDARY_FUNCTION_BUTTON2 = new UIButton(); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SecondaryFunctionView::draglistener can not be nullptr!"); + return false; } - SECONDARY_FUNCTION_BUTTON2->SetPosition(43, 240); - SECONDARY_FUNCTION_BUTTON2->Resize(380, 100); - SECONDARY_FUNCTION_BUTTON2->SetViewId(SECONDARY_FUNCTION_BUTTON2ID); - SECONDARY_FUNCTION_BUTTON2->SetStyle(STYLE_BACKGROUND_COLOR, 0xff000000); - SECONDARY_FUNCTION_BUTTON2->SetStyle(STYLE_BACKGROUND_OPA, 0x00); - SECONDARY_FUNCTION_BUTTON2->SetStyle(STYLE_BORDER_OPA, 0x00); - SECONDARY_FUNCTION_BUTTON2->SetStyle(STYLE_BORDER_COLOR, 0xffffffff); - SECONDARY_FUNCTION_BUTTON2->SetImageSrc(PNG_SETTING_BACKGROUND_IMAGE, nullptr); - SECONDARY_FUNCTION_BUTTON2->SetStyleForState(STYLE_BORDER_COLOR, 0xff0b1928, UIButton::PRESSED); - SECONDARY_FUNCTION_BUTTON2->SetStyleForState(STYLE_BORDER_OPA, 0x00, UIButton::PRESSED); - // Add the CallBack about events - UIView::OnClickListener *button2Click = static_cast(SecondaryFunctionPresenter::GetInstance()); - SECONDARY_FUNCTION_BUTTON2->SetOnClickListener(button2Click); - // Add to rootView - container_->Add(SECONDARY_FUNCTION_BUTTON2); - SECONDARY_FUNCTION_BUTTON2->SetVisible(true); - // Add Label to App - if (label4_ == nullptr) + SecondaryFunctionScrollView->SetOnDragListener(draglistener); + SecondaryFunctionScrollView->SetTouchable(true); + SecondaryFunctionScrollView->SetDraggable(true); + return true; + } + + bool SecondaryFunctionView::SecondaryFunctionScrollButtonInit(void) + { + QuickAccessButton = new UIButton(); + if (QuickAccessButton == nullptr) { - label4_ = new UILabel(); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " ClassicBlueToothView::QuickAccessButton new fail!"); + return false; } - label4_->SetPosition(90, 273); - label4_->SetStyle(STYLE_TEXT_FONT, 30); - label4_->SetStyle(STYLE_LINE_HEIGHT, 35); - - // Set additional property - label4_->SetText("快速训练"); - label4_->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); - label4_->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); - label4_->SetRollSpeed(0); - label4_->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 30); - // Add to rootView - container_->Add(label4_); - label4_->SetVisible(true); - - // Add ImageView to App - if (image4_ == nullptr) + QuickAccessButton->SetPosition(43, 120, 380, 100); + QuickAccessButton->SetViewId(SECONDARY_FUNCTION_QUICK_ACCESS_BUTTON); + QuickAccessButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); + QuickAccessButton->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff4fc34c, UIButton::PRESSED); + QuickAccessButton->SetStyleForState(STYLE_BORDER_COLOR, 0xffffffff, UIButton::PRESSED); + QuickAccessButton->SetStyleForState(STYLE_BORDER_OPA, 0x00, UIButton::PRESSED); + + FastTrainingButton = new UIButton(); + if (FastTrainingButton == nullptr) { - image4_ = new UIImageView(); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, " ClassicBlueToothView::FastTrainingButton new fail!"); + return false; } - image4_->SetPosition(369, 277); - image4_->SetSrc(PNG_SETTING_NEXT_IMAGE); - // Add to rootView - container_->Add(image4_); - image4_->SetVisible(true); + FastTrainingButton->SetPosition(43, 240, 380, 100); + FastTrainingButton->SetViewId(SECONDARY_FUNCTION_FAST_TRAINING_BUTTON); + FastTrainingButton->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919); + FastTrainingButton->SetStyleForState(STYLE_BACKGROUND_COLOR, 0xff4fc34c, UIButton::PRESSED); + FastTrainingButton->SetStyleForState(STYLE_BORDER_COLOR, 0xffffffff, UIButton::PRESSED); + FastTrainingButton->SetStyleForState(STYLE_BORDER_OPA, 0x00, UIButton::PRESSED); + + UIView::OnClickListener *clickListener = static_cast(SecondaryFunctionPresenter::GetInstance()); + QuickAccessButton->SetOnClickListener(clickListener); + FastTrainingButton->SetOnClickListener(clickListener); + + return true; } - void SecondaryFunctionView::DeInitView(void) + + bool SecondaryFunctionView::SecondaryFunctionScrollLabelInit(void) { - if (container_ != nullptr) + // 创建ScreenDurationTitleLabel + LabelConfig labelconfig = { + .left = 173, + .top = 52, + .width = 120, + .height = 35, + .fontSize = 30, + .lineHeigh = 35, + .text = "辅助功能", + .lineBreakMode = UILabel::LINE_BREAK_ADAPT, + }; + + SecondaryFunctionScrollTitleLabel = SetUpLabel(labelconfig); + if (nullptr == SecondaryFunctionScrollTitleLabel) { - container_->RemoveAll(); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SecondaryFunctionView::SecondaryFunctionScrollTitleLabel is nullptr!"); + return false; } - if (label1_ != nullptr) + + labelconfig.left = 90; + labelconfig.top = 153; + labelconfig.text = "快速访问"; + QuickAccessLabel = SetUpLabel(labelconfig); + if (nullptr == SecondaryFunctionScrollTitleLabel) { - delete label1_; - label1_ = nullptr; + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SecondaryFunctionView::QuickAccessLabel is nullptr!"); + return false; } - if (SECONDARY_FUNCTION_BUTTON1 != nullptr) + + labelconfig.top = 273; + labelconfig.text = "快速训练"; + FastTrainingLabel = SetUpLabel(labelconfig); + if (nullptr == SecondaryFunctionScrollTitleLabel) { - delete SECONDARY_FUNCTION_BUTTON1; - SECONDARY_FUNCTION_BUTTON1 = nullptr; + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SecondaryFunctionView::FastTrainingLabel is nullptr!"); + return false; } - if (image3_ != nullptr) + + return true; + } + + bool SecondaryFunctionView::SecondaryFunctionScrollImageInit(void) + { + ImageConfig imageconfig = { + .x = 369, + .y = 157, + .w = 14, + .h = 26, + .ImageSrc = "/user/res/SETTING_NEXT.bin", + }; + + for (int i = 0; i < 2; i++) { - delete image3_; - image3_ = nullptr; + imageconfig.y = 157 + (i * 120); + Image[i] = SetUpImageView(imageconfig); + if (Image[i] == nullptr) + { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SecondaryFunctionView::Image[%d] is nullptr!", i); + return false; + } } - if (label2_ != nullptr) + return true; + } + + // 辅助功能视图初始化 + void SecondaryFunctionView::SecondaryFunctionViewInit(void) + { + if (!SecondaryFunctionScrollViewInit()) { - delete label2_; - label2_ = nullptr; + return; } - if (SECONDARY_FUNCTION_BUTTON2 != nullptr) + + if (!SecondaryFunctionScrollLabelInit()) { - delete SECONDARY_FUNCTION_BUTTON2; - SECONDARY_FUNCTION_BUTTON2 = nullptr; + return; } - if (image4_ != nullptr) + + if (!SecondaryFunctionScrollButtonInit()) { - delete image4_; - image4_ = nullptr; + return; } - if (label4_ != nullptr) + + if (!SecondaryFunctionScrollImageInit()) { - delete label4_; - label4_ = nullptr; + return; } - delete container_; - container_ = nullptr; + initViewStatus = true; } void SecondaryFunctionView::OnStart() { View::OnStart(); - InitView(); - RootView::GetInstance()->Add(container_); + SecondaryFunctionViewInit(); } void SecondaryFunctionView::OnSetUpView() { - View::OnSetUpView(); + SecondaryFunctionScrollView->Add(SecondaryFunctionScrollTitleLabel); + SecondaryFunctionScrollView->Add(QuickAccessButton); + SecondaryFunctionScrollView->Add(FastTrainingButton); + SecondaryFunctionScrollView->Add(QuickAccessLabel); + SecondaryFunctionScrollView->Add(FastTrainingLabel); + SecondaryFunctionScrollView->Add(Image[0]); + SecondaryFunctionScrollView->Add(Image[1]); + RootView::GetInstance()->Add(SecondaryFunctionScrollView); Draw(); }