fix minor fix in a scroll example

This commit is contained in:
Gabor Kiss-Vamosi
2021-05-30 20:39:35 +02:00
parent 1cb57494df
commit 66152438f6

View File

@@ -70,8 +70,10 @@ void lv_example_scroll_6(void)
} }
/*Update the buttons position manually for first*/ /*Update the buttons position manually for first*/
lv_obj_update_layout(cont);
lv_event_send(cont, LV_EVENT_SCROLL, NULL); lv_event_send(cont, LV_EVENT_SCROLL, NULL);
/*Be sure the fist button is in the middle*/
lv_obj_scroll_to_view(lv_obj_get_child(cont, 0), LV_ANIM_OFF);
} }
#endif #endif