lv_100ask_page_manager
lv_100ask_page_manager 是一个 lvgl 页面管理器。
lv_100ask_page_manager 特性:
- 支持多级页面切换
- 跨页面切换
- 页面切换过渡动画
- 可以指定切换页面时是否删除当前页面(节省内存)
- 自定义页面过渡动画(TODO)
- 自定义页面返回按钮(TODO)
- 页面选择器(TODO)
- more todo…
使用示例
lv_100ask_page_manager
使用起来非常简单:
static void init_main_page(lv_obj_t * page);
static void init_page1(lv_obj_t * page);
static void init_page2(lv_obj_t * page);
static void init_page3(lv_obj_t * page);
static void init_page4(lv_obj_t * page);
static void init_page5(lv_obj_t * page);
static void init_page6(lv_obj_t * page);
void lv_100ask_page_manager_simple_test(void)
{
lv_obj_t * page_manager = lv_100ask_page_manager_create(lv_scr_act());
lv_obj_t * main_page = lv_100ask_page_manager_page_create(page_manager, "main_page");
lv_obj_t * page1 = lv_100ask_page_manager_page_create(page_manager, "Page1");
lv_obj_t * page2 = lv_100ask_page_manager_page_create(page_manager, "Page2");
lv_obj_t * page3 = lv_100ask_page_manager_page_create(page_manager, "Page3");
lv_obj_t * page4 = lv_100ask_page_manager_page_create(page_manager, "Page4");
lv_obj_t * page5 = lv_100ask_page_manager_page_create(page_manager, "Page5");
lv_obj_t * page6 = lv_100ask_page_manager_page_create(page_manager, "Page6");
lv_100ask_page_manager_set_page_init(main_page, init_main_page);
lv_100ask_page_manager_set_page_init(page1, init_page1);
lv_100ask_page_manager_set_page_init(page2, init_page2);
lv_100ask_page_manager_set_page_init(page3, init_page3);
lv_100ask_page_manager_set_page_init(page4, init_page4);
lv_100ask_page_manager_set_page_init(page5, init_page5);
lv_100ask_page_manager_set_page_init(page6, init_page6);
lv_100ask_page_manager_set_main_page(page_manager, main_page);
lv_100ask_page_manager_set_open_page(NULL, "main_page");
}