#include "calendar/include/CalendarView.h"
#include "calendar/include/CalendarModel.h"
+#include "uicomponents/UIComponents.h"
#include "wearable_log.h"
#include "UiConfig.h"
static char *dial_id_str[]={"7","8","9","C","%","4","5","6","÷","x","1","2","3","-","+","","0",".","=",""};
+static constexpr int16_t PULLUP_ANIMATOR_VIEW_X = 213;
+static constexpr int16_t PULLUP_ANIMATOR_VIEW_Y = 380;
+static constexpr int16_t PULLUP_ANIMATOR_VIEW_W = 40;
+static constexpr int16_t PULLUP_ANIMATOR_VIEW_H = 40;
+static constexpr int16_t PULLUP_ANIMATOR_VIEW_NUM_FRAMES = 70;
+static constexpr int16_t PULLUP_ANIMATOR_VIEW_TIME = 100;
+
+
+static constexpr const char *PullUpPaths = "/user/res/weather/PullUp/PullUp_";
+
+static constexpr const char *stepPaths = "/user/res/step/";
+
CalendarView::CalendarView()
{
day_label[i] =nullptr;
}
}
+
+ if (PullUpAnimatorView != nullptr)
+ {
+ PullUpAnimatorView->Stop();
+ delete PullUpAnimatorView;
+ PullUpAnimatorView = nullptr;
+ }
+
+ FreeImageInfoArray(PullUpimageAnimator_imageInfo,PullUpPaths, PULLUP_ANIMATOR_VIEW_NUM_FRAMES);
delete group;
group =nullptr;
}
day_label[i]->SetVisible(true);
}
-
+
+ PullUpimageAnimator_imageInfo =CreateImageInfoArray(PullUpPaths, PULLUP_ANIMATOR_VIEW_NUM_FRAMES);
+ if (PullUpAnimatorView == nullptr)
+ {
+ PullUpAnimatorView = new UIImageAnimatorView();
+ if (PullUpAnimatorView == nullptr)
+ {
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "PullUpAnimatorView new fail");
+ return false;
+ }
+ for (uint8_t i = 0; i < PULLUP_ANIMATOR_VIEW_NUM_FRAMES; i++)
+ {
+ //PullUpimageAnimatorInfo[i].imageInfo = ImageCacheManager::GetInstance().LoadSingleRes(PullUpPathsArray[i]);
+ //PullUpimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO;
+ PullUpimageAnimatorInfo[i].imageInfo = PullUpimageAnimator_imageInfo[i];
+ //PullUpPathsArray[i];
+ PullUpimageAnimatorInfo[i].imageType = IMG_SRC_IMAGE_INFO;
+ PullUpimageAnimatorInfo[i].pos.x = PULLUP_ANIMATOR_VIEW_X;
+ PullUpimageAnimatorInfo[i].pos.y = PULLUP_ANIMATOR_VIEW_Y;
+ PullUpimageAnimatorInfo[i].width = PULLUP_ANIMATOR_VIEW_W;
+ PullUpimageAnimatorInfo[i].height = PULLUP_ANIMATOR_VIEW_H;
+ }
+ PullUpAnimatorView->SetPosition(PULLUP_ANIMATOR_VIEW_X, PULLUP_ANIMATOR_VIEW_Y, PULLUP_ANIMATOR_VIEW_W, PULLUP_ANIMATOR_VIEW_H);
+ PullUpAnimatorView->SetStyle(STYLE_BACKGROUND_COLOR, 0xffffffff);
+ PullUpAnimatorView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+ PullUpAnimatorView->SetImageAnimatorSrc(PullUpimageAnimatorInfo, PULLUP_ANIMATOR_VIEW_NUM_FRAMES, PULLUP_ANIMATOR_VIEW_TIME);
+ PullUpAnimatorView->SetRepeat(true);
+ PullUpAnimatorView->Start();
+ }
+ group->Add(PullUpAnimatorView);
+
return true;
}