LVGL开发 | lv_lib_100ask之lvgl页面管理器(lv_100ask_page_manager)-页面管理简单方便
Posted 挨踢民工biubiu
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LVGL开发 | lv_lib_100ask之lvgl页面管理器(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");
效果预览
仓库地址
- gitee: https://gitee.com/weidongshan/lv_lib_100ask/tree/master/src/lv_100ask_page_manager
- github: https://github.com/100askTeam/lv_lib_100ask/tree/master/src/lv_100ask_page_manager
以上是关于LVGL开发 | lv_lib_100ask之lvgl页面管理器(lv_100ask_page_manager)-页面管理简单方便的主要内容,如果未能解决你的问题,请参考以下文章
LVGL开发 | lv_lib_100ask之lvgl计算器(lv_100ask_calc)-接口简单使用便捷
LVGL开发 | lv_lib_100ask之lvgl计算器(lv_100ask_calc)-接口简单使用便捷
LVGL开发 | lv_lib_100ask之lvgl页面管理器(lv_100ask_page_manager)-页面管理简单方便
LVGL开发 | lv_lib_100ask之lvgl页面管理器(lv_100ask_page_manager)-页面管理简单方便
LVGL开发 | lv_lib_100ask之lvgl数字对拼图小游戏(lv_100ask_memory_game)-接口简单使用便捷
LVGL开发 | lv_lib_100ask之lvgl数字对拼图小游戏(lv_100ask_memory_game)-接口简单使用便捷