}
}
+ hairIcon = new UIImageView();
+ if (hairIcon == nullptr)
+ {
+ GRAPHIC_LOGE("hairIcon is nullptr\n");
+ return;
+ }
+ hairIcon->SetAutoEnable(false);
+ hairIcon->SetPosition(0, 0, 360, 360);
+ hairIcon->SetResizeMode(UIImageView::COVER);
+ hairIcon->SetStyle(STYLE_BACKGROUND_OPA, 0x00);
+ hairIcon->SetVisible(false);
ScrollView_->Add(surfaceView_);
ScrollView_->Add(curFace);
+ ScrollView_->Add(hairIcon);//图层逻辑:(从下往上)surfaceView_(视频) -> curFace(头发) -> hairIcon(头发图标)
}
void ThunderBirdMainView::SwitchHair(const char *hairPath)
curFace->SetSrc(hairPath);
curFace->Invalidate();
}
+ void ThunderBirdMainView::SwitchHairIcon(const char *hairIconPath)
+ {
+ if (hairIcon == nullptr || hairIconPath == nullptr) {
+ return;
+ }
+ hairIcon->SetSrc(hairIconPath);
+ hairIcon->SetVisible(true);
+ hairIcon->Invalidate();
+ }
+
+ void ThunderBirdMainView::StopHairIcon(void)
+ {
+ if (hairIcon == nullptr) {
+ return;
+ }
+ hairIcon->SetVisible(false);
+ hairIcon->Invalidate();
+ }
//获取是否开启屏保模式
bool ThunderBirdMainView::GetIsOpenScreenImageModel(void)
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "progress new fail");
return nullptr;
}
- progress->SetPosition(batteryimage->GetX() + 5, batteryimage->GetY() + 4, 18, 12);
- progress->SetValidWidth(18);
+ progress->SetPosition(batteryimage->GetX() + 5, batteryimage->GetY() + 4, 20 ,12);
+ progress->SetValidWidth(20);
progress->SetValidHeight(12);
progress->SetRange(100, 0);
progress->SetStyle(STYLE_BORDER_RADIUS, 3);