lv_obj_move_to_index(lv_obj_get_child(cont,0), child_cnt -1);// 将第一个界面的索引值改为最后一个界面 lv_obj_scroll_to_view(lv_obj_get_child(cont, mid_btn_index), LV_ANIM_OFF);// lv_obj_get_child 通过子索引获取对象的子对象 } } /* 保证界面居中显示 */ lv_obj_set_style_...
lv_obj_t * sw = lv_switch_create(lv_screen_active()); lv_obj_align(sw, LV_ALIGN_TOP_RIGHT, -20, 10); lv_obj_add_event_cb(sw, sw_event_cb, LV_EVENT_ALL, panel); lv_obj_t * label = lv_label_create(lv_screen_active()); lv_label_set_text(label, "One scroll"); lv_o...
lv_anim_timeline_t* anim_timeline =lv_anim_timeline_create();lv_anim_timeline_add(anim_timeline,0, &anim_axis);lv_anim_timeline_add(anim_timeline,100, &anim_obj_01);lv_anim_timeline_add(anim_timeline,1100, &anim_obj_02);lv_anim_timeline_add(anim_timeline,2100, &anim_obj_03);lv_a...
lv_obj_scroll_to(obj, x, y, anim_en);lv_obj_scroll_by(obj, x, y, anim_en);lv_obj_scroll_to_view(child, anim_en); 注意前两个函数的区别:前者是滚动到相应的位置,多次调用只有第一次实际有效;后者是模拟滚动的操作,实际滚动方向是相反的,并且多次调用效果可以叠加。除此之外,后者甚至可以滚动...
I encountered the related issue in 8.1.0 and 8.3.0 As in the title, when lv_obj_set_flex_flow(pg, LV_FLEX_FLOW_ROW) is active, with the lv_obj_scroll_to_view function, the page scrolls in one direction at first. When it comes to the firs...
voidlv_obj_scroll_to_view(struct_lv_obj_t*obj,lv_anim_enable_tanim_en); /** * Scroll to an object until it becomes visible on its parent. * Do the same on the parent's parent, and so on. * Therefore the object will be scrolled into view even it has nested scrollable pa...
void lvgl_tabview_test(void) { /*Create a Tab view object*/ lv_obj_t* tabview; tabview = lv_tabview_create(lv_scr_act(), NULL); /*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/ lv_obj_t* tab1 = lv_tabview_add_tab(tabview, "Tab 1"); ...
static void arc_event_handler(lv_obj_t *obj, lv_event_t event) { int angle = 0; // 改变的角度值 if (event == LV_EVENT_CLICKED) { // 控件上单击事件 LV_LOG_INFO("arc_event_handler->Arc Clicked\n"); } else if (event == LV_EVENT_VALUE_CHANGED) ...
..\..\Middlewares\LVGL\GUI\lvgl\src\core\lv_obj_scroll.c: 0 warnings, 1 error compiling lv...
); lvgl.obj_set_width(label1, 150); lvgl.obj_align(label1, nil, lvgl.ALIGN_CENTER, 0, -30); local label2 = lvgl.label_create(lvgl.scr_act(), nil); lvgl.label_set_long_mode(label2, lvgl.LABEL_LONG_SROLL_CIRC); --Circular scroll lvgl.obj_set_width(label2, 150); lvgl.label...