}
RecentCallLabel->SetAlign(TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_CENTER);
/* ------------------------- TelephoneLineImageView ------------------------- */
- TelephonyInitInterface::ImageParams imageParam = {
- .x = 83,
- .y = 344,
- .width = 300,
- .height = 0,
- .viewId = "TelephoneLineImageView",
- .imgsrc = PNG_TELEPHONELINE_IMAGE,
- };
- TelephoneLineImageView = TelephonyInitInterface::ImageViewInit(imageParam);
- if (TelephoneLineImageView == nullptr)
- {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainPhoneView::TelephoneLineImageView new fail!");
- return;
+ // TelephonyInitInterface::ImageParams imageParam = {
+ // .x = 83,
+ // .y = 344,
+ // .width = 300,
+ // .height = 3,
+ // .viewId = "TelephoneLineImageView",
+ // .imgsrc = NULL,
+ // };
+ // TelephoneLineImageView = TelephonyInitInterface::ImageViewInit(imageParam);
+ // if (TelephoneLineImageView == nullptr)
+ // {
+ // WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainPhoneView::TelephoneLineImageView new fail!");
+ // return;
+ // }
+ // TelephoneLineImageView->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+ // Add ImageView to App
+ if (TelephoneLineImageView == nullptr) {
+ TelephoneLineImageView = new UIImageView();
}
+ TelephoneLineImageView->SetPosition(83, 344); // widget's left position and top position
+ TelephoneLineImageView->Resize(300, 2); // widget's width and height
+ TelephoneLineImageView->SetViewId("image1");// Set style
+ TelephoneLineImageView->SetStyle(STYLE_BACKGROUND_COLOR, 0xff191919);
+ TelephoneLineImageView->SetStyle(STYLE_BACKGROUND_OPA, 0xff);
+
+
/* ------------------------------ NoCallsLabel ------------------------------ */
info = new CallLogInfo[sizeof(CallLogInfo) * CALL_LOG_MAX_NUM];
if (GetCallLog(&info, &num) == -1) {
for (int i = num; i != 0; i--) {
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s",(info + i - 1)->tel);
+ //WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s",(info + i - 1)->tel);
char buf[20]={0};
sprintf_s(buf,20,"%s",(const char*)(info + i - 1)->tel);
}
buttonconfig.y += 20+104;
MainPhoneViewScrollView->Add(button_calllog[i]);
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s",(info + i - 1)->tel);
+ //WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "%s",(info + i - 1)->tel);
time_t currtime;
struct tm *timeinfo;