im in lvgl 9.3,there are a bunch of tutorials on lists. but none that tells us how to cycle through items in them.
appearantly there is a functionality in lvgl itself that helps handle this but no matter what, i can find it. im in eclipse simulator with sdl and typing in text fields work normaly
The latest version of LVGL is 9.1. I guess you mean LVGL8.3. I also hope there is an official example that can loop through the contents of the list.
this example have some codes (lv_list) — LVGL
lv_obj_t * parent = lv_obj_get_parent(obj);
uint32_t i;
for(i = 0; i < lv_obj_get_child_cnt(parent); i++) {
lv_obj_t * child = lv_obj_get_child(parent, i);
if(child == currentButton) {
lv_obj_add_state(child, LV_STATE_CHECKED);
}
else {
lv_obj_clear_state(child, LV_STATE_CHECKED);
}
}
I guess this is not the effect he wants. For example, I have a list with 1-10 options. I want it to go from 1 to 10, and then from 10 to 1, just like a roller.
actually yeah. problem is that i added keyboard driver but it works like hell. i need to double tap for it to work. and im on lvgl 9.3
em…
Is it an effect? I’m sorry for I can’t put the code here, because it does seem a bit excessive, and some of it belongs to a commercial project, but we can discuss the core parts here.
this is exactly what im talking about. but with keyboard and keypad
Is it a physical keyboard? It should work, just rebind the keystroke event callback
problem is the appearant bounce handler builtin lvgl. at least i think thats why every single cycle takes two inputs. i honestly thought i was doing something wrong and so i posted this qustion so maybe a better solution is provided.
if just cycle though items,you shuld sent custom event by keyboad, beacuse No Keys are processed by the object type..you can change fouced or something else in the event handle.