Tileview sliding to the right will lose the sliding state


Tileview sliding to the right will lose the sliding state. For example, when sliding with your finger from coordinates (1,0) to (0,0) coordinates, if you slide your finger slowly, it will continuously jump back to (1,0) Oddly, slow sliding from (0,0) to (1,0) does not have this problem

What MCU/Processor/Board and compiler are you using?


What do you experience?

What do you expect?

Code to reproduce

Screenshot and/or video

Would you mind putting together a simple code sample?

static lv_point_t valid_pos2[] = {{0, 0}, {1, 0}};
lv_obj_t *tv = lv_tileview_create(lv_scr_act(), NULL);
lv_tileview_set_valid_positions(tv, valid_pos2, 2);
lv_obj_set_size(tv, 320, 240);
lv_obj_set_pos(tv, 0, 0);
lv_obj_t *cont1 = lv_cont_create(tv, NULL);
lv_obj_set_size(cont1, 320, 240);
lv_obj_set_pos(cont1, 0, 0);
lv_tileview_add_element(tv, cont1);
lv_obj_t *btn1 = lv_btn_create(cont1, NULL);
lv_obj_align(btn1, cont1, LV_ALIGN_CENTER, 0, 0);
lv_obj_t *cont2 = lv_cont_create(tv, NULL);
lv_obj_set_size(cont2, 320, 240);
lv_obj_set_pos(cont2, 320, 0);
lv_tileview_add_element(tv, cont2);
lv_obj_t *btn2 = lv_btn_create(cont2, NULL);
lv_obj_align(btn2, cont2, LV_ALIGN_CENTER, 0, 0);

You can try swiping from left to right, and swiping from right to left. Only when (1,0) slides to (0,0), the problem of lost slides will occur multiple times.

Forgot to say it only appears when you slide very slowly

I’ve tried in a simulator and it worked well:

Was I too fast or to slow?

I don’t know. I tried it today and switched to the dev / 7.0 branch. This problem did not occur. I did not change my code.amazing!:stuck_out_tongue_closed_eyes:


It would still be good to fix it in 6.1 if possible, but at least we know it won’t be a problem forever.

Tileview and some related mechanisms were improved in dev-7.0. Glad to hear that they work better . :slight_smile: