if (transverseline_1 == nullptr) {
transverseline_1 = new UIImageView();
}
- transverseline_1->SetPosition(0, 169); // widget's left position and top position
- transverseline_1->Resize(466, 2); // widget's width and height
- transverseline_1->SetViewId("image1");// Set style
+ transverseline_1->SetPosition(0, 169);
+ transverseline_1->Resize(466, 2);
transverseline_1->SetStyle(STYLE_BACKGROUND_COLOR, 0xff333333);
transverseline_1->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
transverseline_1->SetVisible(true);
if (transverseline_2 == nullptr) {
transverseline_2 = new UIImageView();
}
- transverseline_2->SetPosition(232, 191); // widget's left position and top position
- transverseline_2->Resize(2, 82); // widget's width and height
- transverseline_2->SetViewId("image2");// Set style
+ transverseline_2->SetPosition(232, 191);
+ transverseline_2->Resize(2, 82);
transverseline_2->SetStyle(STYLE_BACKGROUND_COLOR, 0xff333333);
transverseline_2->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
transverseline_2->SetVisible(true);
if (verticalline == nullptr) {
verticalline = new UIImageView();
}
- verticalline->SetPosition(0, 296); // widget's left position and top position
- verticalline->Resize(466, 2); // widget's width and height
- verticalline->SetViewId("image1");// Set style
+ verticalline->SetPosition(0, 296);
+ verticalline->Resize(466, 2);
verticalline->SetStyle(STYLE_BACKGROUND_COLOR, 0xff333333);
verticalline->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
verticalline->SetVisible(true);
if (mileagegoalTitle == nullptr) {
mileagegoalTitle = new UILabelExt();
}
- mileagegoalTitle->SetPosition(113, 61); // widget's left position and top position
- mileagegoalTitle->Resize(240, 35); // widget's width and height
- mileagegoalTitle->SetViewId("label1");// Set style
+ mileagegoalTitle->SetPosition(113, 61);
+ mileagegoalTitle->Resize(240, 35);
mileagegoalTitle->SetStyle(STYLE_TEXT_FONT, 30);
- // Set additional property
// mileagegoalTitle->SetText("里程(KM)");
mileagegoalTitle->SetTextId(STR_MILEAGE);
mileagegoalTitle->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
if (fatburninggoalTitle == nullptr) {
fatburninggoalTitle = new UILabelExt();
}
- fatburninggoalTitle->SetPosition(8, 188); // widget's left position and top position
- fatburninggoalTitle->Resize(200, 35); // widget's width and height
- fatburninggoalTitle->SetViewId("label1");// Set style
+ fatburninggoalTitle->SetPosition(8, 188);
+ fatburninggoalTitle->Resize(200, 35);
fatburninggoalTitle->SetStyle(STYLE_TEXT_FONT, 30);
- // Set additional property
// fatburninggoalTitle->SetText("燃脂时间");
fatburninggoalTitle->SetTextId(STR_FAT_BURNING_TIME);
fatburninggoalTitle->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
if (standgoalTitle == nullptr) {
standgoalTitle = new UILabelExt();
}
- standgoalTitle->SetPosition(257, 188); // widget's left position and top position
- standgoalTitle->Resize(200, 35); // widget's width and height
- standgoalTitle->SetViewId("label1");// Set style
+ standgoalTitle->SetPosition(257, 188);
+ standgoalTitle->Resize(200, 35);
standgoalTitle->SetStyle(STYLE_TEXT_FONT, 30);
- // Set additional property
// standgoalTitle->SetText("站立次数");
standgoalTitle->SetTextId(STR_NUMBER_OF_STANDS);
standgoalTitle->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
if (caloriegoalTitle == nullptr) {
caloriegoalTitle = new UILabelExt();
}
- caloriegoalTitle->SetPosition(53, 317); // widget's left position and top position
- caloriegoalTitle->Resize(360, 35); // widget's width and height
- caloriegoalTitle->SetViewId("label1");// Set style
+ caloriegoalTitle->SetPosition(53, 317);
+ caloriegoalTitle->Resize(360, 35);
caloriegoalTitle->SetStyle(STYLE_TEXT_FONT, 30);
// Set additional property
// caloriegoalTitle->SetText("消耗卡路里");
if (mileagenowdataLabel == nullptr) {
mileagenowdataLabel = new UILabel();
}
- mileagenowdataLabel->SetPosition(163-20+10, 87); // widget's left position and top position
- mileagenowdataLabel->Resize(75, 60); // widget's width and height
- mileagenowdataLabel->SetViewId("label2");// Set style
+ mileagenowdataLabel->SetPosition(163-20+10, 87);
+ mileagenowdataLabel->Resize(75, 60);
mileagenowdataLabel->SetStyle(STYLE_TEXT_FONT, 40);
// Set additional property
if (mileagegoaldataLabel == nullptr) {
mileagegoaldataLabel = new UILabel();
}
- mileagegoaldataLabel->SetPosition(243-20+10, 86); // widget's left position and top position
- mileagegoaldataLabel->Resize(82, 60); // widget's width and height
- mileagegoaldataLabel->SetViewId("label2");// Set style
+ mileagegoaldataLabel->SetPosition(243-20+10, 86);
+ mileagegoaldataLabel->Resize(82, 60);
mileagegoaldataLabel->SetStyle(STYLE_TEXT_FONT, 40);
// Set additional property
if (fatburningnowdataLabel == nullptr) {
fatburningnowdataLabel = new UILabel();
}
- fatburningnowdataLabel->SetPosition(47-20-10, 223); // widget's left position and top position
- fatburningnowdataLabel->Resize(75, 60); // widget's width and height
- fatburningnowdataLabel->SetViewId("label2");// Set style
+ fatburningnowdataLabel->SetPosition(47-20-10, 223);
+ fatburningnowdataLabel->Resize(75, 60);
fatburningnowdataLabel->SetStyle(STYLE_TEXT_FONT, 40);
// Set additional property
if (fatburninggoaldataLabel == nullptr) {
fatburninggoaldataLabel = new UILabel();
}
- fatburninggoaldataLabel->SetPosition(128-20-10, 223); // widget's left position and top position
- fatburninggoaldataLabel->Resize(82, 60); // widget's width and height
- fatburninggoaldataLabel->SetViewId("label2");// Set style
+ fatburninggoaldataLabel->SetPosition(128-20-10, 223);
+ fatburninggoaldataLabel->Resize(82, 60);
fatburninggoaldataLabel->SetStyle(STYLE_TEXT_FONT, 40);
// Set additional property
if (standnowdataLabel == nullptr) {
standnowdataLabel = new UILabel();
}
- standnowdataLabel->SetPosition(47+200+10, 223); // widget's left position and top position
- standnowdataLabel->Resize(75, 60); // widget's width and height
- standnowdataLabel->SetViewId("label2");// Set style
+ standnowdataLabel->SetPosition(47+200+10, 223);
+ standnowdataLabel->Resize(75, 60);
standnowdataLabel->SetStyle(STYLE_TEXT_FONT, 40);
// Set additional property
if (standgoaldataLabel == nullptr) {
standgoaldataLabel = new UILabel();
}
- standgoaldataLabel->SetPosition(128+200+10, 223); // widget's left position and top position
- standgoaldataLabel->Resize(82, 60); // widget's width and height
- standgoaldataLabel->SetViewId("label2");// Set style
+ standgoaldataLabel->SetPosition(128+200+10, 223);
+ standgoaldataLabel->Resize(82, 60);
standgoaldataLabel->SetStyle(STYLE_TEXT_FONT, 40);
// Set additional property
if (calorienowdataLabel == nullptr) {
calorienowdataLabel = new UILabel();
}
- calorienowdataLabel->SetPosition(163-20-10, 353); // widget's left position and top position
- calorienowdataLabel->Resize(75, 60); // widget's width and height
- calorienowdataLabel->SetViewId("label2");// Set style
+ calorienowdataLabel->SetPosition(163-20-10, 353);
+ calorienowdataLabel->Resize(75, 60);
calorienowdataLabel->SetStyle(STYLE_TEXT_FONT, 40);
// Set additional property
if (caloriegoaldataLabel == nullptr) {
caloriegoaldataLabel = new UILabel();
}
- caloriegoaldataLabel->SetPosition(243-20-10, 353); // widget's left position and top position
- caloriegoaldataLabel->Resize(82+40, 60); // widget's width and height
- caloriegoaldataLabel->SetViewId("label2");// Set style
+ caloriegoaldataLabel->SetPosition(243-20-10, 353);
+ caloriegoaldataLabel->Resize(82+40, 60);
caloriegoaldataLabel->SetStyle(STYLE_TEXT_FONT, 40);
// Set additional property
if (goalTitle == nullptr) {
goalTitle = new UILabelExt();
}
- goalTitle->SetPosition(83, 50); // widget's left position and top position
- goalTitle->Resize(300, 35); // widget's width and height
- goalTitle->SetViewId("label1");// Set style
+ goalTitle->SetPosition(83, 50);
+ goalTitle->Resize(300, 35);
goalTitle->SetStyle(STYLE_TEXT_FONT, 30);
- // Set additional property
// goalTitle->SetText("今日步数");
goalTitle->SetTextId(STR_STEPS_OF_THE_DAY);
goalTitle->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
if (nowstepLabel == nullptr) {
nowstepLabel = new UILabelExt();
}
- nowstepLabel->SetPosition(121-40, 201); // widget's left position and top position
- nowstepLabel->Resize(223+80, 94); // widget's width and height
- nowstepLabel->SetViewId("nowstepLabel");// Set style
+ nowstepLabel->SetPosition(121-40, 201);
+ nowstepLabel->Resize(223+80, 94);
nowstepLabel->SetStyle(STYLE_TEXT_FONT, 80);
-
- // Set additional property
-
nowstepLabel->SetText(GoalModel::GetInstance().getstepnew().c_str());//);
nowstepLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
//nowstepLabel->SetTextColor(0x4FC34C);
if (goalstepLabel == nullptr) {
goalstepLabel = new UILabelExt();
}
- goalstepLabel->SetPosition(157, 297); // widget's left position and top position
- goalstepLabel->Resize(152, 47); // widget's width and height
- goalstepLabel->SetViewId("goalstepLabel");// Set style
+ goalstepLabel->SetPosition(157, 297);
+ goalstepLabel->Resize(152, 47);
goalstepLabel->SetStyle(STYLE_TEXT_FONT, 40);
-
- // Set additional property
goalstepLabel->SetText(GoalModel::GetInstance().getstepGoal().c_str());
goalstepLabel->SetLineBreakMode(UILabel::LINE_BREAK_MARQUEE);
goalstepLabel->SetTextColor(Color::GetColorFromRGBA(0x99, 0x99, 0x99, 0xff));
/*----------------------------------------------------------------------------- */
-
- // Add ImageView to App
if (circleProgressimage == nullptr) {
circleProgressimage = new UIImageView();
}
- circleProgressimage->SetPosition(28, 80-5); // widget's left position and top position
- circleProgressimage->Resize(100, 100); // widget's width and height
- circleProgressimage->SetViewId("image5");// Set style
-
-
+ circleProgressimage->SetPosition(28, 80-5);
+ circleProgressimage->Resize(100, 100);
char* image5imagesPath = "/user/res/step/step_b.bin";
ImageInfo *info= ImageCacheManager::GetInstance().LoadSingleRes(image5imagesPath);
circleProgressimage->SetSrc(info);
-
- // Add to rootView
-
circleProgressimage->SetVisible(true);
- if(circleProgressimage!=NULL)
- {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "circleProgressimage");
- }
-
if (circleProgress1_ == nullptr) {
circleProgress1_ = new UICircleProgress();
}
- circleProgress1_->SetPosition(0, -5); // widget's left position and top position
- circleProgress1_->Resize(466, 466); // widget's width and height
- circleProgress1_->SetViewId("circleProgress1");// Set style
+ circleProgress1_->SetPosition(0, -5);
+ circleProgress1_->Resize(466, 466);
circleProgress1_->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
-
- // Set additional property
- // Set BackgroundStyle
circleProgress1_->SetBackgroundStyle(STYLE_BACKGROUND_COLOR, 0xff000000);
circleProgress1_->SetBackgroundStyle(STYLE_BACKGROUND_OPA, 0x00);
circleProgress1_->SetBackgroundStyle(STYLE_LINE_HEIGHT, 200);