心想事成

想做,就能做到
文章发布热力图

(LVGL)案例预览 页面滚动吸附

页面滚动吸附 /** * Create a 2x2 tile view and allow scrolling only in an "L" shape. * Demonstrate scroll chaining with a long list that * scrolls the til

(LVGL)案例预览 导航栏

水平的导航栏 void lv_example_tabview_1(void) { /*Create a Tab view object*/ lv_obj_t * tabview; tabview = lv_tabview_create(lv_screen_active());

(LVGL)案例预览 表格

表格 static void draw_event_cb(lv_event_t * e) { lv_draw_task_t * draw_task = lv_event_get_draw_task(e); lv_draw_dsc_base_t * base_dsc = (lv_dra

(LVGL)案例预览 开关

开关控件 static void event_handler(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target_obj(e);

(LVGL)案例预览 加载中控件

用于加载中的动画控件 void lv_example_spinner_1(void) { /*Create a spinner*/ lv_obj_t * spinner = lv_spinner_create(lv_screen_active()); lv_obj_set_s

(LVGL)案例预览 音量调节

用于音量调节的控件 static lv_obj_t * spinbox; static void lv_spinbox_increment_event_cb(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e);

(LVGL)案例预览 滑块

滑块 /** * Show how to style a slider. */ void lv_example_slider_2(void) { /*Create a transition*/ static const lv_style_prop_t props[] = {LV_

(LVGL)案例预览 刻度

类似于温度计的刻度 /** * An vertical scale with section and custom styling */ void lv_example_scale_2(void) { lv_obj_t * scale = lv_scale_create(lv_scree

(LVGL)案例预览 弹窗

简单弹窗只带字 static void event_cb(lv_event_t * e) { lv_obj_t * btn = lv_event_get_target_obj(e); lv_obj_t * label = lv_obj_get_child(btn, 0); L

(LVGL)案例预览 JSON 矢量动画

JSON 矢量动画 const uint8_t lv_example_lottie_approve[] = { 0x7b, 0x22, 0x76, 0x22, 0x3a, 0x22, 0x34, 0x2e, 0x38, 0x2e, 0x30, 0x22, 0x2c, 0x22, 0x6d,

(LVGL)案例预览 画线

画线 void lv_example_line_1(void) { /*Create an array for the points of the line*/ static lv_point_precise_t line_points[] = { {5, 5}, {70, 70},

(LVGL)案例预览 LED

LED void lv_example_led_1(void) { /*Create a LED and switch it OFF*/ lv_obj_t * led1 = lv_led_create(lv_screen_active()); lv_obj_align(le

(LVGL)案例预览 文本

文本 void lv_example_label_1(void) { lv_obj_t * label1 = lv_label_create(lv_screen_active()); lv_label_set_long_mode(label1, LV_LABEL_LONG_MODE_

(LVGL)案例预览 键盘

普通键盘 static void ta_event_cb(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); lv_obj_t * ta = lv_event_get_target_obj(e); lv

(LVGL)案例预览 下拉菜单

静态下拉菜单 static void event_handler(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target_obj(e);

(LVGL)案例预览 图表

折线图 void lv_example_chart_1(void) { /*Create a chart*/ lv_obj_t * chart; chart = lv_chart_create(lv_screen_active()); lv_obj_set_size(

(LVGL)案例预览 画布

画布 Canvas #define CANVAS_WIDTH 200 #define CANVAS_HEIGHT 150 void lv_example_canvas_1(void) { lv_draw_rect_dsc_t rect_dsc; lv_draw_rect_dsc

(LVGL)案例预览 按钮

点击一次反转一次颜色的按钮 static void event_handler(lv_event_t * e) { lv_event_code_t code = lv_event_get_code(e); if(code == LV_EVENT_CLICKED) {

(LVGL)案例预览 进度条

带框的进度条动画 void lv_example_bar_2(void) { static lv_style_t style_bg; static lv_style_t style_indic; lv_style_init(&style_bg); lv_style_

(LVGL)案例预览 圆弧

带把手可调圆弧 static void value_changed_event_cb(lv_event_t * e); void lv_example_arc_1(void) { lv_obj_t * label = lv_label_create(lv_screen_active());