Description
Hi,
i am facing an issue with labels
What MCU/Processor/Board and compiler are you using?
ARM
What do you experience?
when i set text from handleHumidity function the text is not showing as written. as per the code the text is set to below to temp_decrease img button. but the text is setting to right alignment.
but when i hardcode the text in humidity object it showing perfect.
What do you expect?
i want to print this text exactly below the img button.
Code to reproduce
static lv_obj_t * humidity;
static lv_obj_t * temp_decrease;
void test_screen(void)
{
temp_decrease=lv_imgbtn_create(lv_scr_act(), NULL);
lv_imgbtn_set_src(temp_decrease,LV_BTN_STATE_RELEASED,&temp_down);
lv_imgbtn_set_src(temp_decrease,LV_BTN_STATE_PRESSED,&temp_down);
lv_obj_align(temp_decrease,NULL,LV_ALIGN_CENTER,0,0);
humidity = lv_label_create(lv_scr_act(), NULL);
lv_label_set_text(humidity, "");
lv_obj_align(humidity,temp_decrease,LV_ALIGN_OUT_BOTTOM_MID,0,30);
}
int handleHumidity(char *message){
printf("### Message Arrived [Humidity]: %s",message); //Here message value is 36
char curr_humidity[64];
sprintf(curr_humidity,"Humidity is %s",message);
lv_label_set_text(humidity,curr_humidity);
return 0;
}
Screenshot and/or video
If possible, add screenshots and/or videos about the current issue.