button->SetText(buttonconfig.str);
button->SetAlign(TEXT_ALIGNMENT_LEFT);
- button->SetLabelPosition(50,-23);
- button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 35);
+ button->SetLabelPosition(50,30);
+ button->SetFont(DEFAULT_VECTOR_FONT_FILENAME, 23);
+ button->SetTextColor(Color::GetColorFromRGBA(0x66, 0x66, 0x66, 0xff));
button->SetStyleForState(STYLE_BACKGROUND_COLOR,0xff191919, UIButton::PRESSED);
return button;
void MainPhoneView:: NewcalllogButtonExtupdata(CallLogInfo *data, uint8_t index,uint8_t i)
{
+ return;
+
if(index==0)
{
//SwipeViewItem[i][0]
char *txt;
char buf[20]={0};
sprintf_s(buf,20,"%s",(const char*)(data)->tel);
- char name[64]={0};
+ char name[NAME_LEN+1]={0};
if(get_phone_addrss_name(name,buf,NULL))
{
txt=name;
buttonconfig.h = 104;
buttonconfig.ViewId="xxxx";
- char buf[20]={0};
- sprintf_s(buf,20,"%s",(const char*)(data)->tel);
- char name[64]={0};
- if(get_phone_addrss_name(name,buf,NULL))
- {
- buttonconfig.str=name;
- }else
- {
- buttonconfig.str=buf;
- }
+
+ time_t currtime;
+ struct tm *timeinfo;
+ currtime=(data)->creationTime;
+ timeinfo = localtime(&currtime);
+ char time_buf[20]={0};
+
+
+ sprintf_s(time_buf,20 ,"%d-%d-%d %d:%02d", timeinfo->tm_year + 1900,timeinfo->tm_mon + 1,timeinfo->tm_mday,timeinfo->tm_hour,timeinfo->tm_min);
+ buttonconfig.str=time_buf;
+
buttonconfig.ViewId=(const char*)(data)->tel;
button_calllog[i]=SetTheButton_ext(buttonconfig,ButtonOnclickListen);
if(button_calllog[i]==nullptr)
TempGroup_->Add(button_calllog[i]);
+
+
+
TelephonyInitInterface::LabelParams labelParam = {
- .x = 50,
- .y = 60,
- .width = 160,
- .height = 35,
- .fontSize = 23,
+ .x = 49,
+ .y = 19,
+ .width = 280,
+ .height = 41,
+ .fontSize = 35,
.lineHeigh = 0,
- .text = "2023-1-23 14:22",
- .lineBreakMode = UILabel::LINE_BREAK_ADAPT,
+ .text = "xxx",
+ .lineBreakMode = UILabel::LINE_BREAK_MARQUEE,
};
- time_t currtime;
- struct tm *timeinfo;
- currtime=(data)->creationTime;
- timeinfo = localtime(&currtime);
- char time_buf[20]={0};
-
- labelParam.x=50,
- labelParam.text=time_buf;
- labelParam.fontSize = 23;
- sprintf_s(time_buf,20 ,"%d-%d-%d %d:%02d", timeinfo->tm_year + 1900,timeinfo->tm_mon + 1,timeinfo->tm_mday,timeinfo->tm_hour,timeinfo->tm_min);
-
-
- button_calllog_time[i] = TelephonyInitInterface::LabelViewInit(labelParam,Color::GetColorFromRGBA(0x66, 0x66, 0x66, 0xff));
+ char buf[20]={0};
+ sprintf_s(buf,20,"%s",(const char*)(data)->tel);
+ char name[NAME_LEN+1]={0};
+ if(get_phone_addrss_name(name,buf,NULL))
+ {
+ labelParam.text=name;
+ }
+ else
+ {
+ labelParam.text=buf;
+ }
+ button_calllog_time[i] = TelephonyInitInterface::LabelViewInit(labelParam,Color::GetColorFromRGBA(0xEE, 0xEE, 0xEE, 0xEE));
if (button_calllog_time[i] == nullptr)
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "MainPhoneView::MainPhoneViewTitleLabel new fail!");
labelParam.fontSize=18;
labelParam.x=223+30;
+ labelParam.y=60;
labelParam.lineBreakMode=UILabel::LINE_BREAK_MARQUEE;
labelParam.width=72;
labelParam.height=21;
//if(strcmp(phone,addressbook_t.Contact_t[i].phone_number_t[0].number)==0)
if(addrss_strcmp((char *)phone,addressbook_t.Contact_t[i].phone_number_t[0].number))
{
- strcpy(name,addressbook_t.Contact_t[i].name);
+ strcpy_s(name,NAME_LEN+1,addressbook_t.Contact_t[i].name);
if(sex!=NULL)
*sex=addressbook_t.Contact_t[i].sex;
return true;
//if(strcmp(phone,addressbook_t.Contact_t[i].phone_number_t[1].number)==0)
if(addrss_strcmp((char *)phone,addressbook_t.Contact_t[i].phone_number_t[1].number))
{
- strcpy(name,addressbook_t.Contact_t[i].name);
+ strcpy_s(name,NAME_LEN+1,addressbook_t.Contact_t[i].name);
if(sex!=NULL)
*sex=addressbook_t.Contact_t[i].sex;
return true;
}
}
}
- strcpy(name,"未知");
+ strcpy_s(name,NAME_LEN+1,"未知");
return false;
}