From: Caisking Date: Mon, 28 Apr 2025 02:30:22 +0000 (+0800) Subject: 修改GetRootContainer的更新 X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~342 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=7d04693994f02cdb169f741379040008408d36e2;p=mirrors%2FFD230.git 修改GetRootContainer的更新 --- diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarm/src/AlarmCloseRingView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarm/src/AlarmCloseRingView.cpp index e69e8b6ef..f6bd43da4 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarm/src/AlarmCloseRingView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarm/src/AlarmCloseRingView.cpp @@ -14,8 +14,10 @@ #include "graphic_timer.h" #include "AlarmPopUpPresenter.h" -#include "PhoneService.h" +#ifdef FD230_650 +#include "PhoneService.h" +#endif namespace OHOS { #define CLOSE "关闭" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantView.cpp index 24b85261d..50e4d7824 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/assistant/src/AssistantView.cpp @@ -241,7 +241,7 @@ void AssistantView::OnStart() { InitView(); - // RootView::GetInstance()->SetOnKeyActListener(presenter_); + //RootView::GetInstance()->SetOnKeyActListener(presenter_); AddViewToRootContainer(AssistantScrollView[ASSISTANT_MAIN_VIEW]); } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodDetectionView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodDetectionView.cpp index a3a038609..76075bf74 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodDetectionView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodDetectionView.cpp @@ -157,9 +157,9 @@ namespace OHOS imageAnimator->Start(); } - GetRootContainer()->SetDraggable(true); - GetRootContainer()->SetTouchable(true); - GetRootContainer()->SetOnDragListener(presenter_); + RootView::GetInstance()->SetDraggable(true); + RootView::GetInstance()->SetTouchable(true); + RootView::GetInstance()->SetOnDragListener(presenter_); // 增加按键监听 // presenter_->SetOnKeyActListener(keyactListener); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultView.cpp index 19e2735d4..8d5a118f3 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/bloodoxygen/src/BloodResultView.cpp @@ -202,13 +202,13 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "BloodResultView::InitBloodView fail"); } - GetRootContainer()->SetDraggable(true); - GetRootContainer()->SetTouchable(true); - GetRootContainer()->SetOnDragListener(presenter_); + RootView::GetInstance()->SetDraggable(true); + RootView::GetInstance()->SetTouchable(true); + RootView::GetInstance()->SetOnDragListener(presenter_); // 增加按键监听 // RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::BloodResultPresenter::GetInstance(); - // RootView::GetInstance()->SetOnKeyActListener(keyactListener); + //RootView::GetInstance()->SetOnKeyActListener(keyactListener); } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/calculator/src/CalculatorView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/calculator/src/CalculatorView.cpp index d032f7bb2..1e89cf6d3 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/calculator/src/CalculatorView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/calculator/src/CalculatorView.cpp @@ -25,7 +25,7 @@ CalculatorView::CalculatorView() CalculatorView::~CalculatorView() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "::CalculatorView::~CalculatorView "); - RootView::GetInstance()->ClearOnKeyActListener(); + g_pMainView = nullptr; group->RemoveAll(); if(number) @@ -624,12 +624,12 @@ void CalculatorView::OnStart() View::OnStart(); AddViewToRootContainer(new UIViewGroup()); - GetRootContainer()->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); - GetRootContainer()->SetTouchable(true); - GetRootContainer()->SetDraggable(true); + RootView::GetInstance()->SetPosition(0, 0, Screen::GetInstance().GetWidth(), Screen::GetInstance().GetHeight()); + RootView::GetInstance()->SetTouchable(true); + RootView::GetInstance()->SetDraggable(true); RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::CalculatorPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::GetInstance()->SetOnKeyActListener(keyactListener); group = new UIViewGroup(); if (group == nullptr) { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/themestyle/src/ThemeStyleView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/themestyle/src/ThemeStyleView.cpp index d3c285e44..a233fb3b7 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/themestyle/src/ThemeStyleView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/themestyle/src/ThemeStyleView.cpp @@ -336,7 +336,7 @@ namespace OHOS { ThemeStyleViewInit(); } - RootView::GetInstance()->SetOnKeyActListener(presenter_); + RootView::GetInstance()->SetOnKeyActListener(presenter_); } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingEnddataView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingEnddataView.cpp index 8922ed496..c209ac355 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingEnddataView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingEnddataView.cpp @@ -667,7 +667,7 @@ static void SetKeyActListener() { // 增加按键监听 RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::TraingEnddataPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::GetInstance()->SetOnKeyActListener(keyactListener); } void TraingEnddataView::OnStart() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingNomalView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingNomalView.cpp index 7e4e2047f..126068527 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingNomalView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingNomalView.cpp @@ -98,7 +98,7 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); // 增加按键监听 RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::TraingNomalPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::GetInstance()->SetOnKeyActListener(keyactListener); } void TraingNomalView::OnStart() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingSetView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingSetView.cpp index a9a2735b3..0b6b4a162 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingSetView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingSetView.cpp @@ -244,7 +244,7 @@ namespace OHOS WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "TraingSetView:: new container[%d] fail", thisview); return false; } - RootView::GetInstance()->Add(SetTagScrollView[thisview]); + GetRootContainer()->Add(SetTagScrollView[thisview]); } return true; } @@ -260,7 +260,7 @@ namespace OHOS return false; } SetTagScrollView[thisview] = setcalories->SetCaluliViewInit(); - RootView::GetInstance()->Add(SetTagScrollView[thisview]); + GetRootContainer()->Add(SetTagScrollView[thisview]); } WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetTagScrollView[%d] is not null", thisview); return true; @@ -277,7 +277,7 @@ namespace OHOS return false; } SetTagScrollView[thisview] = settime->SetTimeViewInit(); - RootView::GetInstance()->Add(SetTagScrollView[thisview]); + GetRootContainer()->Add(SetTagScrollView[thisview]); } WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetTagScrollView[%d] is not null", thisview); return true; @@ -294,7 +294,7 @@ namespace OHOS return false; } SetTagScrollView[thisview] = setmile->SetMileViewInit(); - RootView::GetInstance()->Add(SetTagScrollView[thisview]); + GetRootContainer()->Add(SetTagScrollView[thisview]); } WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetTagScrollView[%d] is not null", thisview); return true; @@ -311,7 +311,7 @@ namespace OHOS return false; } SetTagScrollView[thisview] = setstep->SetStepViewInit(); - RootView::GetInstance()->Add(SetTagScrollView[thisview]); + GetRootContainer()->Add(SetTagScrollView[thisview]); } WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetTagScrollView[%d] is not null", thisview); return true; @@ -390,7 +390,7 @@ namespace OHOS WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); // 增加按键监听 RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::TraingSetPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::GetInstance()->SetOnKeyActListener(keyactListener); } void TraingSetView::OnStart() { @@ -425,13 +425,13 @@ namespace OHOS } SetKeyActListener(); - // RootView::GetInstance()->Add(SetTagScrollView[SET_VIEW]); + // GetRootContainer()->Add(SetTagScrollView[SET_VIEW]); // SetCurrentViewId(SET_VIEW); // 设置当前页面ID if (group != nullptr) { SetTagScrollView[SET_VIEW] = group; - RootView::GetInstance()->Add(SetTagScrollView[SET_VIEW]); + GetRootContainer()->Add(SetTagScrollView[SET_VIEW]); SetCurrentViewId(SET_VIEW); } } diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingView.cpp index fa6af936a..b79ec68bb 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/src/TraingView.cpp @@ -223,7 +223,7 @@ static void SetKeyActListener() { // 增加按键监听 RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::TraingPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::GetInstance()->SetOnKeyActListener(keyactListener); } void TraingView::OnStart() { #if 0 diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include/TraingCardPresenter.h b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include/TraingCardPresenter.h index 8422992b0..b2f2fdd26 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include/TraingCardPresenter.h +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/include/TraingCardPresenter.h @@ -9,7 +9,11 @@ #include "traing/training_card/include/TrainingDataView.h" #include "traing/training_card/include/TrainingDetailView.h" -// #include "bletest.h" +#ifdef SUPPORT_BLE_SERVICE +#include +#include "bleService.h" +#include "bletest.h" +#endif #include "components/root_view.h" #include "components/ui_swipe_view.h" diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/src/TraingCardView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/src/TraingCardView.cpp index 49d42be28..70cf11f3a 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/src/TraingCardView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_card/src/TraingCardView.cpp @@ -618,7 +618,7 @@ void TraingCardView ::InitView() { } swipe_->SetOnSwipeListener(onSwipeListener); - RootView::GetInstance()->SetOnKeyActListener(presenter_); + RootView::GetInstance()->SetOnKeyActListener(presenter_); WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "TraingCardView::InitPage over"); } @@ -840,7 +840,7 @@ void TraingCardView::ShowEndView() { back->SetImageSrc(YES_IMAGE, YES_IMAGE); endView->Add(exit); endView->Add(back); - RootView::GetInstance()->Add(endView); + GetRootContainer()->Add(endView); endView->SetDraggable(false); endView->SetTouchable(true); endView->SetVisible(false); // 界面隐藏 @@ -885,7 +885,7 @@ void TraingCardView::ShowGetTagView() { getView->Add(buttonok_); InitImageAnimator(); - RootView::GetInstance()->Add(getView); + GetRootContainer()->Add(getView); getView->SetDraggable(false); getView->SetTouchable(true); getView->SetVisible(false); // 界面隐藏 @@ -931,7 +931,7 @@ void TraingCardView::ShowHeartView() { TraingCardPresenter::GetInstance())); heartView->Add(buttonnote_); - RootView::GetInstance()->Add(heartView); + GetRootContainer()->Add(heartView); heartView->SetDraggable(false); heartView->SetTouchable(true); heartView->SetVisible(false); // 界面隐藏 diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_aquatic/src/TraingAquaticView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_aquatic/src/TraingAquaticView.cpp index 6769b0b7f..c36af5387 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_aquatic/src/TraingAquaticView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_aquatic/src/TraingAquaticView.cpp @@ -32,7 +32,7 @@ void TraingAquaticView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingAquaticPresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingAquaticView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_ball/src/TraingBallView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_ball/src/TraingBallView.cpp index 5ca38c485..6d66afc19 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_ball/src/TraingBallView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_ball/src/TraingBallView.cpp @@ -30,7 +30,7 @@ void TraingBallView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingBallPresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingBallView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_dance/src/TraingDanceView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_dance/src/TraingDanceView.cpp index 52a704224..602e00570 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_dance/src/TraingDanceView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_dance/src/TraingDanceView.cpp @@ -30,7 +30,7 @@ void TraingDanceView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingDancePresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingDanceView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_fitness/src/TraingFitnessView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_fitness/src/TraingFitnessView.cpp index 6a9366207..a7da83abe 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_fitness/src/TraingFitnessView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_fitness/src/TraingFitnessView.cpp @@ -32,7 +32,7 @@ void TraingFitnessView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingFitnessPresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingFitnessView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_ice/src/TraingIceView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_ice/src/TraingIceView.cpp index ace4ad7d6..9e97dbe8c 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_ice/src/TraingIceView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_ice/src/TraingIceView.cpp @@ -32,7 +32,7 @@ void TraingIceView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingIcePresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingIceView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_limit/src/TraingLimitView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_limit/src/TraingLimitView.cpp index 2fbb6cf23..c0eb69ac0 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_limit/src/TraingLimitView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_limit/src/TraingLimitView.cpp @@ -33,7 +33,7 @@ void TraingLimitView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingLimitPresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingLimitView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_more/src/TraingMoreView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_more/src/TraingMoreView.cpp index 6627d50bc..dae490569 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_more/src/TraingMoreView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_more/src/TraingMoreView.cpp @@ -30,7 +30,7 @@ void TraingMoreView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingMorePresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingMoreView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_other/src/TraingOtherView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_other/src/TraingOtherView.cpp index f6c9ae449..abaf5afd3 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_other/src/TraingOtherView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_other/src/TraingOtherView.cpp @@ -32,7 +32,7 @@ void TraingOtherView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingOtherPresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingOtherView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_rest/src/TraingRestView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_rest/src/TraingRestView.cpp index 42853f353..50dbfe67e 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_rest/src/TraingRestView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traing/training_list_rest/src/TraingRestView.cpp @@ -31,7 +31,7 @@ void TraingRestView::SetKeyActListener() { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetKeyActListener"); auto keyActListener = static_cast( TraingRestPresenter::GetInstance()); - RootView::GetInstance()->SetOnKeyActListener(keyActListener); + RootView::GetInstance()->SetOnKeyActListener(keyActListener); } void TraingRestView::InitScrollView() { diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traingrecord/src/TraingRecordView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traingrecord/src/TraingRecordView.cpp index b810c0297..a136b5425 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/traingrecord/src/TraingRecordView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/traingrecord/src/TraingRecordView.cpp @@ -160,7 +160,7 @@ void TraingRecordView::ShowLackView() { lackView->Add(imagerecord); lackView->Add(buttongo); - // RootView::GetInstance()->lackView + // GetRootContainer()->lackView scrollview->Add(lackView); // printf("lackView Add\r\n"); @@ -271,7 +271,7 @@ void TraingRecordView::OnStart() { // 增加按键监听 RootView::OnKeyActListener *keyactListener = (RootView::OnKeyActListener *)OHOS::TraingRecordPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); + RootView::GetInstance()->SetOnKeyActListener(keyactListener); if (TraingRecordModel::GetInstance().GetJsonStatus()) { recordView->Add(TraingRecordList); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/uisample/src/UISampleView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/uisample/src/UISampleView.cpp index d2d7777ed..85b6feff8 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/uisample/src/UISampleView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/uisample/src/UISampleView.cpp @@ -51,7 +51,7 @@ void UISampleView::InitView() mainList_->SetOnDragListener(dragListener_); } AddViewToRootContainer(mainList_); - GetRootContainer()->Invalidate(); + RootView::GetInstance()->Invalidate(); } void UISampleView::OnStart() diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/uisample/uitest/framework/src/test_case_list_adapter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/uisample/uitest/framework/src/test_case_list_adapter.cpp index d2161b62d..6e6fb1bbf 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/uisample/uitest/framework/src/test_case_list_adapter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/uisample/uitest/framework/src/test_case_list_adapter.cpp @@ -50,7 +50,7 @@ public: if (uiTest != nullptr) { uiTest->TearDown(); } - RootView::GetInstance()->SetOnKeyActListener(g_keyListener); + RootView::GetInstance()->SetOnKeyActListener(g_keyListener); g_keyListener = nullptr; UISampleView::GetInstance()->InitView(); return true; @@ -83,8 +83,8 @@ public: tempView->SetViewId(view.GetViewId()); tempView->SetPosition(tempView->GetX(), tempView->GetY()); rootContainer->Add(tempView); - g_keyListener = RootView::GetInstance()->GetOnKeyActListener(); - RootView::GetInstance()->SetOnKeyActListener(nullptr); + g_keyListener = RootView::GetInstance()->GetOnKeyActListener(); + RootView::GetInstance()->SetOnKeyActListener(nullptr); } if (backBtn_ == nullptr) { backBtn_ = new TransparentBackButton(); diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/weather/src/MainWeatherView.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/weather/src/MainWeatherView.cpp index caa57f44c..591a5054b 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/weather/src/MainWeatherView.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/weather/src/MainWeatherView.cpp @@ -113,7 +113,7 @@ namespace OHOS weatherSwipeViewList->SetVisible(false); weatherScrllView->SetOnDragListener(presenter_); } - GetRootContainer()->Invalidate(); + RootView::GetInstance()->Invalidate(); return true; } return false; diff --git a/code/sdk/application/wearable/nativeapp/nativeui/player/include/BluetoothView.h b/code/sdk/application/wearable/nativeapp/nativeui/player/include/BluetoothView.h deleted file mode 100644 index a5465e563..000000000 --- a/code/sdk/application/wearable/nativeapp/nativeui/player/include/BluetoothView.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) CompanyNameMagicTag 2021-2021. All rights reserved. - * Description: Bluetooth view 设置页面 - * Create: 2021-09-5 - */ - -#ifndef BLUETOOTH_VIEW_H -#define BLUETOOTH_VIEW_H - -#include "components/ui_label.h" -#include "components/ui_image_view.h" -#include "components/ui_radio_button.h" -#include "components/ui_label_button.h" -#include "components/ui_view_group.h" - -namespace OHOS { -class PlayerOnDragListener; -class BluetoothView { -public: - BluetoothView(); - virtual ~BluetoothView(); - UIViewGroup *LoadBluetoothView(void); - static BluetoothView *GetInstance(void); - UIViewGroup *group{nullptr}; - UIRadioButton *GetPhoneButton(void); - UIRadioButton *GetWatchButton(void); - UIButton *GetSettingButton(void); - UILabelButton *GetDeleteButton(void); -private: - UILabel *watchLabel{nullptr}; - UILabel *phoneLabel{nullptr}; - UILabel *bluetoothLabel{nullptr}; - UIImageView *watchImage{nullptr}; - UIImageView *phoneImage{nullptr}; - UIImageView *bluetoothImage{nullptr}; - UIRadioButton *watchButton{nullptr}; - UIRadioButton *phoneButton{nullptr}; - UIButton *settingButton{nullptr}; - UILabelButton *deleteButton{nullptr}; - int LoadRadioButton(); - int LoadButtonView(); - int LoadLabelButton(); - int LoadLabel(); - int LoadImage(); - - void SetUpButton(UILabelButton *btn, const Point& point, int16_t width, int16_t height, - UIView::OnClickListener *listener); -}; -} // namespace OHOS -#endif \ No newline at end of file