Description
I have a screen loaded, which serves as the main screen for the HMI of a system. When the user clicks a particular button, a new (smaller) window is loaded on top of the main screen in such a way that it emulates a modal dialog. The main screen size is 800 x 480 and the smaller window size is 400 x 250. The following code snippet comes from the code creating the smaller window:
scrTitleRename = lv_obj_create(NULL);
pnlTitleRename = lv_obj_create(scrTitleRename);
lv_obj_set_size(pnlTitleRename, 400, 250);
lv_obj_set_flex_flow(pnlTitleRename, LV_FLEX_FLOW_COLUMN);
/* ...some other setup stuff happening here... */
lv_obj_set_style_text_color(lblTitleRenameCaption, lv_color_white(), 0);
lv_obj_set_style_bg_color(pnlTitleRename, lv_palette_darken(LV_PALETTE_GREY, 4), 0);
lv_obj_set_style_bg_opa(scrTitleRename, LV_OPA_80, 0);
lv_obj_set_align(pnlTitleRename, LV_ALIGN_CENTER);
The smaller window contains a text area widget where the user must type in text. This window is loaded when a specific button on the main screen is clicked by the user, as follows:
lv_screen_load(scrTitleRename);
When typing text, the keyboard is displayed on the screen as follows:
When the bottom left button on the keyboard is clicked (triggering LV_EVENT_CANCEL), the keyboard is supposed to be hidden, by using:
lv_obj_add_flag(kb, LV_OBJ_FLAG_HIDDEN);
However, for some reason, only the section of the keyboard over the smaller window is hidden, and the rest of the keyboard that was displayed over the original main screen is still displayed, as follows:
How can the keyboard be made to hide completely instead of causing the above “artifact”? One thing I tried to do is to capture the LV_EVENT_CANCEL event and load the original screen and directly thereafter the smaller window (essentially the same way that it got displayed in the first place), but that has no effect.
The code is currently running only in the latest Windows simulator, not yet on an embedded platform.
What MCU/Processor/Board and compiler are you using?
Windows simulator.
What LVGL version are you using?
Version 9.0.0
What do you want to achieve?
See description.
What have you tried so far?
See description.
Code to reproduce
See code snippets in description.
Screenshot and/or video
See description.