From: 罗正yun <1732036298@qq.com> Date: Thu, 18 Jan 2024 08:12:11 +0000 (+0800) Subject: 指南针视图修改 X-Git-Tag: release_V1.2.70_20241020_135402~1363 X-Git-Url: http://git.snicker.com.cn/Users/apple/Desktop/static/gitweb.css?a=commitdiff_plain;h=7cc419aa7f0b43ef706d24ff769b167b604fbe55;p=mirrors%2FFD230.git 指南针视图修改 --- diff --git a/code/sdk/application/wearable/nativeapp/nativelauncher/include/ui_resource_image.h b/code/sdk/application/wearable/nativeapp/nativelauncher/include/ui_resource_image.h index 9a1a5e388..c59a407f8 100755 --- a/code/sdk/application/wearable/nativeapp/nativelauncher/include/ui_resource_image.h +++ b/code/sdk/application/wearable/nativeapp/nativelauncher/include/ui_resource_image.h @@ -59,9 +59,9 @@ namespace OHOS { static const int DROPDOWN_SAVEPOWER = 0x40000b; // 省电模式 static const int DROPDOWN_SETTING = 0x40000c; // 设置 /* -------------------------------------------------------------------------- */ - static const int COMPASS_ROTATE_CENTER_IMAGE = 0x500001; - static const int COMPASS_CORRESPONDENCE_DEGREE = 0x500002; - static const int COMPASS_COMPASS = 0x500003; + static const int COMPASS_COMPASS0 = 0x500001; //背景 + static const int COMPASS_COMPASS1 = 0x500002; //标记点图片 + static const int COMPASS_COMPASS2 = 0x500003; //三角 } #endif diff --git a/code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistView.h b/code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistView.h index 1383e0046..08c4bb2ff 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistView.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/applist/include/ApplistView.h @@ -46,11 +46,11 @@ public: WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "AppList : Can not continue drag!!"); return false; } - // if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && - // (event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) { - // WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Applist Ondrag!!"); - // NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE, TRANSITION_ZOOM); - // } + if ((event.GetDragDirection() == DragEvent::DIRECTION_LEFT_TO_RIGHT) && + (event.GetDeltaX() > X_DRAG_OFFSET) && (event.GetDeltaX() > (DOUBLES * MATH_ABS(event.GetDeltaY())))) { + WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Applist Ondrag!!"); + NativeAbility::GetInstance().ChangeSlice(VIEW_MAIN_SAMPLE, TRANSITION_ZOOM); + } return false; } diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassCalibrationView.h b/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassCalibrationView.h index b6469cccf..7ee91ba7a 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassCalibrationView.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassCalibrationView.h @@ -22,7 +22,7 @@ public: bool CreateUIViewGroup(void); static CompassCalibrationView *GetInstance(void); - bool InitView(void *caller) override; + bool InitView(void *caller); private: UILabel *labelOne{nullptr}; UILabel *labelTwo{nullptr}; diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassPresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassPresenter.h index 85c5d6fd5..e742c53b6 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassPresenter.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassPresenter.h @@ -36,9 +36,9 @@ public: void DisplayAngleRight(uint16_t angle); private: - int16_t lastRotateAngle{0}; - int16_t currentRotateAngle{0}; - int16_t angleDiff{0}; + int16_t lastRotateAngle{0}; //上一次的旋转角度 + int16_t currentRotateAngle{0}; //当前的旋转角度 + int16_t angleDiff{0}; //角度差 bool getAngleStatus{false}; bool initDisplayStatus{true}; }; diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassView.h b/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassView.h index 276ae7d85..622a74a32 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassView.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/include/CompassView.h @@ -29,19 +29,18 @@ public: static CompassView *GetInstance(void); void CompassStartRotate(int16_t numb); bool InitPage(void); - bool InitView(void *caller) override; + bool InitView(void *caller); bool GetInitViewState(void); bool InitCompassImage(void); - private: bool LoadCompassImage(UIImageView *view, uint32_t resId); void ClearAll(void); - UILabel *directionLabel{nullptr}; - UILabel *angledLabel{nullptr}; - UIImageView *backGround{nullptr}; - UIImageView *rotateShaft{nullptr}; - UIImageView *triangulation{nullptr}; - const Vector2 VIEW_CENTER = {VIEW_CENTERS, VIEW_CENTERS}; + UILabel *directionLabel{nullptr}; //方向标签 + UILabel *angledLabel{nullptr}; //角度标签 + UIImageView *backGround{nullptr}; //背景图片 + UIImageView *PlaceMarkerImage{nullptr}; //放置标记图片 + UIImageView *triangulation{nullptr}; //三角图片 + const Vector2 VIEW_CENTER = {VIEW_CENTERS, VIEW_CENTERS};//二维向量 }; } #endif \ No newline at end of file diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/include/MainCompassPresenter.h b/code/sdk/application/wearable/nativeapp/nativeui/compass/include/MainCompassPresenter.h index 9db65c4f6..30580afcd 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/include/MainCompassPresenter.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/include/MainCompassPresenter.h @@ -16,12 +16,10 @@ #include "CompassPresenter.h" #include "CompassModel.h" #include "CompassCalibrationView.h" -#include "KeyInputListener.h" -#include "common/key_code.h" namespace OHOS { class CompassView; -class MainCompassPresenter : public Presenter, public CompassPresenter, public RootView::OnKeyActListener, +class MainCompassPresenter : public Presenter, public CompassPresenter, public ModelListenerSample, public UIView::OnDragListener { public: MainCompassPresenter(); @@ -34,7 +32,6 @@ public: static MainCompassPresenter *GetInstance(void); bool OnDrag(UIView& view, const DragEvent& event) override; - bool OnKeyAct(UIView& view, const KeyEvent& event) override;//增加按键事件 virtual void Notify() override; }; } diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassPresenter.cpp index 5c78f2643..e92033630 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassPresenter.cpp @@ -69,15 +69,15 @@ CompassPresenter* CompassPresenter::GetInstance(void) { return g_pMainView; } - +//显示指南针的角度 void CompassPresenter::DisplayAngleRight(uint16_t angle) { if ((angle >= RIGHT_WESTNORTH_UP_338) || (angle >= 0 && angle < RIGHT_NORTH_DOWN_23)) { - CompassView::GetInstance()->DirectionSetText(NORTH_DIRECTION, (std::to_string(angle) + "°").c_str()); + CompassView::GetInstance()->DirectionSetText(NORTH_DIRECTION, ("~" + std::to_string(angle) + "°").c_str()); } for (int i = 0; i < DIRECTION_COUNT; i++) { if ((angle >= g_compassList[i].beginAngle) && (angle < g_compassList[i].endAngle)) { - CompassView::GetInstance()->DirectionSetText(g_compassList[i].dir, (std::to_string(angle) + "°").c_str()); + CompassView::GetInstance()->DirectionSetText(g_compassList[i].dir, ("~" + std::to_string(angle) + "°").c_str()); } } } @@ -93,7 +93,7 @@ void CompassPresenter::DisplayAngleDir(uint16_t angle) } } - +//在范围内旋转指南针 void CompassPresenter::InScopeRotate(void) { angleDiff = lastRotateAngle - currentRotateAngle; @@ -138,6 +138,7 @@ void CompassPresenter::InScopeRotate(void) } } +//在指南针视图初始化的情况下,根据旋转角度的变化来执行指南针的旋转操作,并在需要的时候更新显示的角度和方向。 void CompassPresenter::DetermineToRotate(void) { if (CompassView::GetInstance() == nullptr) { @@ -166,7 +167,7 @@ void CompassPresenter::DetermineToRotate(void) } } GraphicService::GetInstance()->PostGraphicEvent(std::bind(&CompassModel::SetDisplayAngle, - CompassModel::GetInstance(), 1)); + CompassModel::GetInstance(), 1));//将任务发布到异步线程 } } \ No newline at end of file diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassView.cpp index 5f4b901a5..5fded09b8 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassView.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/CompassView.cpp @@ -9,19 +9,24 @@ #include "ui_resource_image.h" #include "CompassView.h" #include "MainCompassView.h" - +#include "CompassPresenter.h" namespace OHOS { -static constexpr int16_t POINT_CENTER_IMAGE_X = 150; -static constexpr int16_t POINT_CENTER_IMAGE_Y = 150; -static constexpr int16_t TRIANGULATION_X = 210; +static constexpr int16_t POINT_CENTER_IMAGE_X = 192; +static constexpr int16_t POINT_CENTER_IMAGE_Y = 282; +static constexpr int16_t TRIANGULATION_X = 221; static constexpr int16_t TRIANGULATION_Y = 0; -static constexpr int16_t DIRECTIONLABEL_X = 160; -static constexpr int16_t DIRECTIONLABEL_Y = 215; -static constexpr int16_t FONT_TEXT_SIZE = 25; -static constexpr int16_t ANGLEDLABEL_X = 215; -static constexpr int16_t ANGLEDLABEL_Y = 215; -static constexpr int16_t TEXT_WIDTH = 90; -static constexpr int16_t TEXT_HEIGHT = 35; +static constexpr int16_t DIRECTIONLABEL_X = 198; +static constexpr int16_t DIRECTIONLABEL_Y = 131; +static constexpr int16_t DIRECTIONLABEL_TEXT_WIDTH = 70; +static constexpr int16_t DIRECTIONLABEL_TEXT_HEIGH = 42; +static constexpr int16_t DIRECTIONLABEL_FONT_TEXT_SIZE = 35; +static constexpr int16_t DIRECTIONLABEL_STYLE_LINE_HEIGHT = 42; +static constexpr int16_t ANGLEDLABEL_X = 136; +static constexpr int16_t ANGLEDLABEL_Y = 182; +static constexpr int16_t ANGLEDLABEL_TEXT_WIDTH = 194; +static constexpr int16_t ANGLEDLABEL_TEXT_HEIGHT = 94; +static constexpr int16_t ANGLEDLABEL_FONT_TEXT_SIZE = 80; +static constexpr int16_t ANGLEDLABEL_STYLE_LINE_HEIGHT = 94; static constexpr int16_t RANDOM_NUMBER_720 = 720; static constexpr int16_t RANDOM_NUMBER_360 = 360; static constexpr int16_t DELAYING_NUMS = 2000; @@ -56,22 +61,23 @@ void CompassView::ClearAll(void) delete backGround; backGround = nullptr; } - if (rotateShaft != nullptr) { - delete rotateShaft; - rotateShaft = nullptr; + if(PlaceMarkerImage != nullptr) + { + delete PlaceMarkerImage; + PlaceMarkerImage = nullptr; } if (triangulation != nullptr) { delete triangulation; triangulation = nullptr; } } - +//方向和角度设置 void CompassView::DirectionSetText(const char *text, const char *angle) { directionLabel->SetText(text); angledLabel->SetText(angle); } - +//加载指南针图片 bool CompassView::LoadCompassImage(UIImageView *view, uint32_t resId) { std::string file = COMPASS_IAMGES; @@ -84,7 +90,7 @@ bool CompassView::LoadCompassImage(UIImageView *view, uint32_t resId) view->SetSrc(image); return true; } - +//初始化指南针图片 bool CompassView::InitCompassImage(void) { backGround = new UIImageView(); @@ -94,19 +100,19 @@ bool CompassView::InitCompassImage(void) } backGround->SetPosition(0, 0); - if (LoadCompassImage(backGround, COMPASS_COMPASS) == false) { + if (LoadCompassImage(backGround, COMPASS_COMPASS0) == false) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d], triangulation load fail", __LINE__); return false; } - rotateShaft = new UIImageView(); - if (rotateShaft == nullptr) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d], rotateShaft new fail", __LINE__); + PlaceMarkerImage = new UIImageView(); + if (PlaceMarkerImage == nullptr) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d], PlaceMarkerImage new fail", __LINE__); return false; } - rotateShaft->SetPosition(POINT_CENTER_IMAGE_X, POINT_CENTER_IMAGE_Y); - if (LoadCompassImage(rotateShaft, COMPASS_ROTATE_CENTER_IMAGE) == false) { - WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d], rotateShaft load fail", __LINE__); + PlaceMarkerImage->SetPosition(POINT_CENTER_IMAGE_X, POINT_CENTER_IMAGE_Y); + if (LoadCompassImage(PlaceMarkerImage, COMPASS_COMPASS1) == false) { + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "[%d], PlaceMarkerImage load fail", __LINE__); return false; } @@ -116,13 +122,13 @@ bool CompassView::InitCompassImage(void) return false; } triangulation->SetPosition(TRIANGULATION_X, TRIANGULATION_Y); - if (LoadCompassImage(triangulation, COMPASS_CORRESPONDENCE_DEGREE) == false) { + if (LoadCompassImage(triangulation, COMPASS_COMPASS2) == false) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "triangulation load fail"); return false; } return true; } - +//初始化页面 bool CompassView::InitPage(void) { if (InitCompassImage() == false) { @@ -138,9 +144,12 @@ bool CompassView::InitPage(void) return false; } directionLabel->SetPosition(DIRECTIONLABEL_X, DIRECTIONLABEL_Y); - directionLabel->Resize(TEXT_WIDTH, TEXT_HEIGHT); + directionLabel->Resize(DIRECTIONLABEL_TEXT_WIDTH, DIRECTIONLABEL_TEXT_HEIGH); directionLabel->SetText("北"); - directionLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_TEXT_SIZE); + directionLabel->SetStyle(STYLE_TEXT_FONT, DIRECTIONLABEL_FONT_TEXT_SIZE); + directionLabel->SetStyle(STYLE_LINE_HEIGHT, DIRECTIONLABEL_STYLE_LINE_HEIGHT); + directionLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, DIRECTIONLABEL_FONT_TEXT_SIZE); + directionLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); directionLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); directionLabel->SetStyle(STYLE_TEXT_OPA, OPA_OPAQUE); directionLabel->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT); @@ -152,17 +161,20 @@ bool CompassView::InitPage(void) ClearAll(); return false; } - angledLabel->SetPosition(ANGLEDLABEL_X, ANGLEDLABEL_Y); - angledLabel->Resize(TEXT_WIDTH, TEXT_HEIGHT); - angledLabel->SetText("0°"); - angledLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, FONT_TEXT_SIZE); + angledLabel->SetPosition(ANGLEDLABEL_X, ANGLEDLABEL_Y); + angledLabel->Resize(ANGLEDLABEL_TEXT_WIDTH, ANGLEDLABEL_TEXT_HEIGHT); + angledLabel->SetText("~0°"); + angledLabel->SetStyle(STYLE_TEXT_FONT, ANGLEDLABEL_FONT_TEXT_SIZE); + angledLabel->SetStyle(STYLE_LINE_HEIGHT, ANGLEDLABEL_STYLE_LINE_HEIGHT); + angledLabel->SetFont(DEFAULT_VECTOR_FONT_FILENAME, ANGLEDLABEL_FONT_TEXT_SIZE); + angledLabel->SetLineBreakMode(UILabel::LINE_BREAK_ADAPT); angledLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER); angledLabel->SetStyle(STYLE_TEXT_OPA, OPA_OPAQUE); angledLabel->SetStyle(STYLE_BACKGROUND_OPA, OPA_TRANSPARENT); angledLabel->SetStyle(STYLE_TEXT_COLOR, Color::White().full); Add(backGround); - Add(rotateShaft); + Add(PlaceMarkerImage); Add(triangulation); Add(directionLabel); Add(angledLabel); @@ -172,7 +184,7 @@ bool CompassView::InitPage(void) return true; } - +//初始化视图为可拖拽,可触摸 bool CompassView::InitView(void *caller) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "CompassView InitView %p", caller); @@ -194,7 +206,7 @@ CompassView *CompassView::GetInstance(void) { return g_pCompassView; } - +//背景图片逆时针旋转numb度 void CompassView::CompassStartRotate(int16_t numb) { if (backGround == nullptr) { diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassPresenter.cpp b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassPresenter.cpp index cc0a91178..11787e542 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassPresenter.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassPresenter.cpp @@ -47,24 +47,7 @@ bool MainCompassPresenter::OnDrag(UIView& view, const DragEvent& event) } return true; } -//增加按键事件 -bool MainCompassPresenter::OnKeyAct(UIView& view, const KeyEvent& event) -{ - uint16 keyID = event.GetKeyId(); - WEARABLE_LOGD("","into key! keyID %u\n",keyID); -#if 0 - //如果是power键就返回上一级 - if (keyID == static_cast(ZliteKeyCode::ZLITE_KEY_POWER)) - { - uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId(); - NativeAbility::GetInstance().ChangeSlice(VIEW_APPLIST); - } -#endif - //目前只有一个按键。直接切换 - uint16_t preSlice = NativeAbility::GetInstance().GetPreSliceId(); - NativeAbility::GetInstance().ChangeSlice(preSlice); - return true; -} + void MainCompassPresenter::Notify() { diff --git a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassView.cpp b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassView.cpp index 1f8d0d4b4..9e762804a 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassView.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/compass/src/MainCompassView.cpp @@ -71,10 +71,6 @@ void MainCompassView::OnStart() return; } - //增加按键监听 - RootView::OnKeyActListener*keyactListener = (RootView::OnKeyActListener*)OHOS::MainCompassPresenter::GetInstance(); - RootView::GetInstance()->SetOnKeyActListener(keyactListener); - UIView::OnDragListener *compassCalibrationDragListener = (UIView::OnDragListener *) OHOS::MainCompassPresenter::GetInstance(); if (compassCalibrationDragListener == nullptr) { diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp b/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp index 96f4a9ac2..920ebd2ec 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainPresenterSample.cpp @@ -27,7 +27,9 @@ map g_jumpView = { { MAIN_CLICK_WEATHER, VIEW_MAIN_SAMPLE }, { MAIN_CLICK_ACTIVITY, VIEW_MAIN_ACTIVITY }, // 活动记录界面 { MAIN_CLICK_MESSAGE, VIEW_MAIN_SAMPLE }, // 消息app { MAIN_CLICK_HEARTRATE, VIEW_MAIN_SAMPLE }, // 心率界面 - }; + { DROPDOWN_CLICK_SETTING,VIEW_SETTING}, // 设置 + { DROPDOWN_CLICK_BLUETOOTH,VIEW_BLUETOOTH_EARPHONE}, // 蓝牙 + }; // map g_chanColor = { { DROPDOWN_CLICK_FINDMYPHONE, DROPDOWN_DROPDOWN_FIND_PHONE_B }, // { DROPDOWN_CLICK_APPLIST, DROPDOWN_DROPDOWN_FIND_PHONE_B}, @@ -115,9 +117,9 @@ bool MainPresenterSample::OnClick(UIView &view, const ClickEvent &event) // } // } - // if (g_jumpView.count(curViewId) != 0) { - // NativeAbility::GetInstance().ChangeSlice(g_jumpView[curViewId]); - // } + if (g_jumpView.count(curViewId) != 0) { + NativeAbility::GetInstance().ChangeSlice(g_jumpView[curViewId]); + } return true; } bool MainPresenterSample::OnLongPress(UIView& view, const LongPressEvent& event) diff --git a/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp b/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp index bcd2c564e..a642c803f 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/main/src/MainViewSample.cpp @@ -31,7 +31,7 @@ namespace OHOS {COMPASS, &MainViewSample::InitCompassPage}, {BloodOxygen, &MainViewSample::InitBloodOxygenPage}, {TRAINING, &MainViewSample::InitTrainingPage}, - {APPLIST,&MainViewSample::InitApplistPage} + //{APPLIST,&MainViewSample::InitApplistPage} }; MainViewSample::MainViewSample() diff --git a/code/sdk/application/wearable/nativeapp/nativeui/screensetting/include/ScreenModels.h b/code/sdk/application/wearable/nativeapp/nativeui/screensetting/include/ScreenModels.h index bb525229e..acf92e553 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/screensetting/include/ScreenModels.h +++ b/code/sdk/application/wearable/nativeapp/nativeui/screensetting/include/ScreenModels.h @@ -28,7 +28,7 @@ typedef enum { TRAINING, BloodOxygen, COMPASS, - APPLIST, + //APPLIST, MAX_CARD, } CardId; diff --git a/code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp b/code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp index 670d63f13..6913973a3 100755 --- a/code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp +++ b/code/sdk/application/wearable/nativeapp/nativeui/screensetting/src/ScreenModels.cpp @@ -170,7 +170,7 @@ void ScreenModels::PreLoadAppimages(void) { LoadAppMultiImages(PLAYER_IAMGES, PLAYER_PLAYERSMODEL_RANDOM, PLAYER_PLAYERHIGHLIGHT); LoadAppMultiImages(CLOCK_IAMGES, CLOCK_CLASSIC_GEOMETRY, CLOCK_SECOND); - LoadAppMultiImages(COMPASS_IAMGES, COMPASS_ROTATE_CENTER_IMAGE, COMPASS_COMPASS); + LoadAppMultiImages(COMPASS_IAMGES, COMPASS_COMPASS0, COMPASS_COMPASS2); LoadAppMultiImages(DROPDOWN_IAMGES, DROPDOWN_BLUETOOTHCONNECTED, DROPDOWN_SETTING); LoadAppMultiImages(HEART_IAMGES, HEART_HEARTRATECOOR, HEART_HEARTRATE_TOP); } diff --git a/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_clock_dial/CompassView.h b/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_clock_dial/CompassView.h index b4525855c..a1263f0e6 100755 --- a/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_clock_dial/CompassView.h +++ b/code/sdk/middleware/services/gui/uikit/sample/uitest/components/ui_test_clock_dial/CompassView.h @@ -13,8 +13,8 @@ * limitations under the License. */ -#ifndef COMPASS_VIEW_H -#define COMPASS_VIEW_H +#ifndef COMPASS_VIEW_H_ +#define COMPASS_VIEW_H_ #include "components/root_view.h" #include "components/ui_label.h"