diff --git a/examples/scroll/lv_example_scroll_6.c b/examples/scroll/lv_example_scroll_6.c index 1fcd5fa5b..010af3b82 100644 --- a/examples/scroll/lv_example_scroll_6.c +++ b/examples/scroll/lv_example_scroll_6.c @@ -70,8 +70,10 @@ void lv_example_scroll_6(void) } /*Update the buttons position manually for first*/ - lv_obj_update_layout(cont); 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