STM32F446
OLED Display SSD1306
LVGL version 8.2
Is it possible to create a simple bar on a monochrome display?
I’m creating a frame.
Text with animation is printed.
But the bar is not created.
void lv_example(void)
{
lv_obj_t *frame = lv_obj_create(lv_scr_act());
lv_obj_set_size(frame, 128, 64);
lv_obj_t *label2 = lv_label_create(frame);
lv_obj_set_width(label2, 128);
lv_obj_align(label2, LV_ALIGN_BOTTOM_MID, 0, 0);
lv_label_set_text(label2, "It is a circularly scrolling text. ");
lv_label_set_long_mode(label2, LV_LABEL_LONG_SCROLL_CIRCULAR);
lv_obj_t *bar = lv_bar_create(frame);
lv_bar_set_mode(bar, LV_BAR_MODE_NORMAL);
lv_obj_set_size(bar, 128, 10);
lv_obj_set_align(bar, LV_ALIGN_CENTER);
lv_bar_set_value(bar, 50, LV_ANIM_OFF);
}