当前位置:网站首页>LVLG 8.2 circular scrolling animation of a label
LVLG 8.2 circular scrolling animation of a label
2022-07-04 14:35:00 【Fairy sword love】
Create custom circular scrolling Text scrolling effect
static void lv_example_label_5(void)
{
static lv_anim_t animation_template; / Animation variable definition
static lv_style_t label_style;
lv_anim_init(&animation_template);
lv_anim_set_delay(&animation_template, 1000); // Set the wait 1 Seconds to start animation
lv_anim_set_repeat_delay(&animation_template,
3000); // Delay after the animation returns to the initial position 3 Second repeated scrolling
/*Initialize the label style with the animation template*/
lv_style_init(&label_style);
lv_style_set_anim(&label_style, &animation_template); // sytle Associate animation variables
lv_obj_t* label1 = lv_label_create(lv_scr_act()); // establish label
lv_label_set_long_mode(label1, LV_LABEL_LONG_SCROLL_CIRCULAR); //Circular scroll Pattern
lv_obj_set_width(label1, 150); // Set width
lv_label_set_text(label1, "It is a circularly scrolling text. ");// Set text content
lv_obj_align(label1, LV_ALIGN_CENTER, 0, 40);//LV_ALIGN_CENTER Alignment
lv_obj_add_style(label1, &label_style, LV_STATE_DEFAULT); //label add to style
}
Running effect
边栏推荐
- Oppo find N2 product form first exposure: supplement all short boards
- Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design
- Xcode abnormal pictures cause IPA packet size problems
- Matters needing attention in overseas game Investment Agency
- Classify boost libraries by function
- MySQL stored procedure exercise
- LVGL 8.2 keyboard
- Respect others' behavior
- 架构方面的进步
- A collection of classic papers on convolutional neural networks (deep learning classification)
猜你喜欢
开发中常见问题总结
Gin integrated Alipay payment
基于51单片机的超声波测距仪
Data warehouse interview question preparation
迅为IMX6Q开发板QT系统移植tinyplay
C # WPF realizes the real-time screen capture function of screen capture box
Digi XBee 3 rf: 4 protocols, 3 packages, 10 major functions
An overview of 2D human posture estimation
Detailed explanation of visual studio debugging methods
Docker compose public network deployment redis sentinel mode
随机推荐
Alcohol driving monitoring system based on stm32+ Huawei cloud IOT design
2022 game going to sea practical release strategy
Leetcode T48: rotating images
尊重他人的行为
Free, easy-to-use, powerful lightweight note taking software evaluation: drafts, apple memo, flomo, keep, flowus, agenda, sidenote, workflow
Ruiji takeout notes
Combined with case: the usage of the lowest API (processfunction) in Flink framework
LifeCycle
(1) The standard of performance tuning and the correct posture for tuning - if you have performance problems, go to the heapdump performance community!
LVGL 8.2 Menu
Red envelope activity design in e-commerce system
Industrial Internet has greater development potential and more industry scenarios
Nowcoder rearrange linked list
Leetcode 61: 旋转链表
Excel quickly merges multiple rows of data
数据埋点的一些问题和想法
商业智能BI财务分析,狭义的财务分析和广义的财务分析有何不同?
LVGL 8.2 Draw label with gradient color
Oppo find N2 product form first exposure: supplement all short boards
Leetcode T47: 全排列II