Important: unclear posts may not receive useful answers.
- Get familiar with Markdown to format and structure your post
- Be sure to update lvgl from the latest version from the
- Be sure you have checked the FAQ and read the relevant part of the documentation.
- If applicable use the Simulator to eliminate hardware related issues.
Delete this section if you read and applied the mentioned points.
I am using lvgl to create UI interface, but I have encountered strange problems. Since I just came into contact with lvgl8.2, I only wanted to display one icon on the interface at first, but I found that the screen interface was divided into two parts. I only created one icon, but two icons were displayed, and it can be seen that the width of the icon has become half. How to solve this problem?
Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.
The code block(s) should be formatted like:
/*You code here*/
static lv_color_t* disp_buf1;
disp_buf1 = (lv_color_t*)malloc(HOR_RES VER_RESsizeof(lv_color_t));
static lv_disp_draw_buf_t draw_buf;
lv_disp_draw_buf_init(&draw_buf, disp_buf1, NULL, HOR_RES * VER_RES)；
static lv_disp_drv_t disp_drv;
disp_drv.draw_buf = &draw_buf;
disp_drv.flush_cb = fbdev_flush;
disp_drv.hor_res = HOR_RES;
disp_drv.ver_res = VER_RES;
lv_obj_t* label = lv_label_create(lv_scr_act());
lv_obj_set_style_text_font(label, &lv_font_montserrat_32, 0);
If possible, add screenshots and/or videos about the current state.